Programming/ld64
- build-block added
This commit is contained in:
37
Programming/ld64/files/PR-29723629.patch
Normal file
37
Programming/ld64/files/PR-29723629.patch
Normal file
@@ -0,0 +1,37 @@
|
||||
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
|
||||
Reference in New Issue
Block a user