From c1395bb543b3b02b491d1c16374af6efbc77a5d2 Mon Sep 17 00:00:00 2001 From: van Hauser Date: Thu, 9 Apr 2020 10:36:28 +0200 Subject: LTO llvm11 (#302) * new LTO mode for llvm 11 * remove unneeded afl-ld and env vars --- llvm_mode/afl-llvm-lto-instrumentation.so.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'llvm_mode/afl-llvm-lto-instrumentation.so.cc') diff --git a/llvm_mode/afl-llvm-lto-instrumentation.so.cc b/llvm_mode/afl-llvm-lto-instrumentation.so.cc index 4bc16f17..2a9b17b2 100644 --- a/llvm_mode/afl-llvm-lto-instrumentation.so.cc +++ b/llvm_mode/afl-llvm-lto-instrumentation.so.cc @@ -378,7 +378,8 @@ bool AFLLTOPass::runOnModule(Module &M) { M, Int32Ty, true, GlobalValue::ExternalLinkage, 0, "__afl_final_loc", 0, GlobalVariable::GeneralDynamicTLSModel, 0, false); ConstantInt *const_loc = ConstantInt::get(Int32Ty, afl_global_id); - AFLFinalLoc->setAlignment(4); + MaybeAlign Align = MaybeAlign(4); + AFLFinalLoc->setAlignment(Align); AFLFinalLoc->setInitializer(const_loc); } @@ -423,5 +424,5 @@ static RegisterPass X("afl-lto", "afl++ LTO instrumentation pass", false, false); static RegisterStandardPasses RegisterAFLLTOPass( - PassManagerBuilder::EP_OptimizerLast, registerAFLLTOPass); + PassManagerBuilder::EP_FullLinkTimeOptimizationLast, registerAFLLTOPass); -- cgit 1.4.1