38 lines
1.3 KiB
Diff
38 lines
1.3 KiB
Diff
guard usage of thinlto_code_gen_t behind an appropriate API version check
|
|
|
|
--- src/ld/parsers/lto_file.cpp
|
|
+++ src/ld/parsers/lto_file.cpp
|
|
@@ -292,12 +292,14 @@ private:
|
|
std::vector<const ld::Atom*>& newAtoms,
|
|
std::vector<const char*>& additionalUndefines);
|
|
|
|
+#if LTO_API_VERSION >= 18
|
|
static thinlto_code_gen_t init_thinlto_codegen(const std::vector<File*>& files,
|
|
const std::vector<const ld::Atom*>& allAtoms,
|
|
ld::Internal& state,
|
|
const OptimizeOptions& options,
|
|
CStringToAtom& deadllvmAtoms,
|
|
CStringToAtom& llvmAtoms);
|
|
+#endif
|
|
|
|
static std::vector<File*> _s_files;
|
|
static bool _s_llvmOptionsProcessed;
|
|
@@ -1035,6 +1037,7 @@ bool Parser::optimizeLTO(const std::vector<File*> files,
|
|
return true;
|
|
}
|
|
|
|
+#if LTO_API_VERSION >= 18
|
|
// Create the ThinLTO codegenerator
|
|
thinlto_code_gen_t Parser::init_thinlto_codegen(const std::vector<File*>& files,
|
|
const std::vector<const ld::Atom*>& allAtoms,
|
|
@@ -1185,6 +1188,7 @@ thinlto_code_gen_t Parser::init_thinlto_codegen(const std::vector<File*>&
|
|
|
|
return thingenerator;
|
|
}
|
|
+#endif
|
|
|
|
// Full LTO processing
|
|
bool Parser::optimizeThinLTO(const std::vector<File*>& files,
|
|
--
|
|
2.11.0
|