<div dir="ltr"><div style="font-family:courier new,monospace" class="gmail_default">​Hi again, Teresa.<br><br></div><div style="font-family:courier new,monospace" class="gmail_default">Looks like I had forgotten to report back with success<br></div><div style="font-family:courier new,monospace" class="gmail_default">when finally building 3.9.0 in ThinLTO linker mode<br></div><div style="font-family:courier new,monospace" class="gmail_default">back in October. Sorry about that and thanks for<br></div><div style="font-family:courier new,monospace" class="gmail_default">helping me out. I know how important it is to get<br></div><div style="font-family:courier new,monospace" class="gmail_default">success reports as well, as a developer myself,<br></div><div style="font-family:courier new,monospace" class="gmail_default">so sorry again :(.<br></div><div style="font-family:courier new,monospace" class="gmail_default"><br></div><div style="font-family:courier new,monospace" class="gmail_default">While that worked back then, last weekend I tried to<br></div><div style="font-family:courier new,monospace" class="gmail_default">build 3.9.1 using 3.9.0 as installed from Arch Linux<br>and ran into a familiar issue but in another module.<br></div><div style="font-family:courier new,monospace" class="gmail_default">I was using the Arch Linux package because it worked<br></div><div style="font-family:courier new,monospace" class="gmail_default">the last time and without something like a chroot,<br></div><div style="font-family:courier new,monospace" class="gmail_default">I cannot build 3.9.1 with personal-3.9.0 and then<br></div><div style="font-family:courier new,monospace" class="gmail_default">overwrite it with the new build because the ninja<br></div><div style="font-family:courier new,monospace" class="gmail_default">scripts hard-code paths to CC and CXX which then<br></div><div style="font-family:courier new,monospace" class="gmail_default">ends in an error.<br></div><div style="font-family:courier new,monospace" class="gmail_default"><br></div>I tried twice, and before I try another build,<div style="font-family:courier new,monospace;display:inline" class="gmail_default">​ ​</div>I wonder about this:<br><div style="font-family:courier new,monospace" class="gmail_default"><br></div><div style="font-family:courier new,monospace" class="gmail_default">- Should I avoid any and all CFLAGS, CXXFLAGS, CPPFLAGS,<br></div><div style="font-family:courier new,monospace" class="gmail_default">  LDFLAGS in favor of passing these exclusively as<br></div><div style="font-family:courier new,monospace" class="gmail_default">  cmake's -Dsomething_something=<FLAGS>? Linux distros<br></div><div style="font-family:courier new,monospace" class="gmail_default">  usually have an environment with CFLAGS etc. and use<br></div><div style="font-family:courier new,monospace" class="gmail_default">  that building packages and this didn't interfere in the<br></div><div style="font-family:courier new,monospace" class="gmail_default">  past in my builds, but I'm open to avoid this by unsetting<br></div><div style="font-family:courier new,monospace" class="gmail_default">  any such variables first.<br><br></div><div style="font-family:courier new,monospace" class="gmail_default">- Is there a configuration in the CI matrix that builds all<br></div><div style="font-family:courier new,monospace" class="gmail_default">  of LLVM with ThinLTO so that I can be reasonably sure<br></div><div style="font-family:courier new,monospace" class="gmail_default">  any error is most likely local to my environment or<br></div><div style="font-family:courier new,monospace" class="gmail_default">  because of operator (silly me) faults?<br><br></div><div style="font-family:courier new,monospace" class="gmail_default">$ svn info<br></div><div style="font-family:courier new,monospace" class="gmail_default">URL: <a href="http://llvm.org/svn/llvm-project/llvm/branches/release_39">http://llvm.org/svn/llvm-project/llvm/branches/release_39</a><br>Relative URL: ^/llvm/branches/release_39<br>Repository Root: <a href="http://llvm.org/svn/llvm-project">http://llvm.org/svn/llvm-project</a><br>Repository UUID: 91177308-0d34-0410-b5e6-96231b3b80d8<br>Revision: 290054<br>Node Kind: directory<br>Schedule: normal<br>Last Changed Author: tstellar<br>Last Changed Rev: 288847<br></div><div style="font-family:courier new,monospace" class="gmail_default"><br><br></div><div style="font-family:courier new,monospace" class="gmail_default">I also pass these in LDFLAGS but they're not visible<br></div><div style="font-family:courier new,monospace" class="gmail_default">in the error trace below:<br>    -Wl,-plugin-opt,-function-sections \<br>    -Wl,-plugin-opt,-data-sections \<br></div><div style="font-family:courier new,monospace" class="gmail_default"><br></div><div style="font-family:courier new,monospace" class="gmail_default">Any idea why lldb-argdumper would fail to link reproducably?<br></div><div style="font-family:courier new,monospace" class="gmail_default"><br></div><div style="font-family:courier new,monospace" class="gmail_default">$ ninja<br><br>[...]<br></div><div style="font-family:courier new,monospace" class="gmail_default"><br>[3480/3688] Linking CXX executable bin/lldb-argdumper<br>FAILED: bin/lldb-argdumper<br>: && /usr/bin/clang++ -O2 -pipe<br>-fstack-protector-strong<br>--param=ssp-buffer-size=4<br>-march=x86-64<br>-mtune=generic<br>-fPIC<br>-fvisibility-inlines-hidden<br>-Wall<br>-W<br>-Wno-unused-parameter<br>-Wwrite-strings<br>-Wcast-qual<br>-Wmissing-field-initializers<br>-pedantic<br>-Wno-long-long<br>-Wcovered-switch-default<br>-Wnon-virtual-dtor<br>-Wdelete-non-virtual-dtor<br>-Werror=date-time<br>-std=c++11<br>-fcolor-diagnostics<br>-ffunction-sections<br>-fdata-sections<br>-flto=thin<br>-Wno-deprecated-declarations<br>-Wno-unknown-pragmas<br>-Wno-strict-aliasing<br>-Wno-deprecated-register<br>-Wno-vla-extension<br>-O3<br>-DNDEBUG<br>-fuse-ld=gold<br>-flto=thin<br>-Wl,-allow-shlib-undefined<br>-Wl,-O3<br>-Wl,--gc-sections<br>tools/lldb/tools/argdumper/CMakeFiles/lldb-argdumper.dir/argdumper.cpp.o<br>-o bin/lldb-argdumper -lpthread lib/liblldb.so.3.9.1 -Wl,--start-group<br>lib/liblldbBase.a lib/liblldbBreakpoint.a lib/liblldbCommands.a<br>lib/liblldbDataFormatters.a lib/liblldbHost.a lib/liblldbCore.a<br>lib/liblldbExpression.a lib/liblldbInitialization.a<br>lib/liblldbInterpreter.a lib/liblldbSymbol.a lib/liblldbTarget.a<br>lib/liblldbUtility.a lib/liblldbPluginDisassemblerLLVM.a<br>lib/liblldbPluginSymbolFileDWARF.a lib/liblldbPluginSymbolFilePDB.a<br>lib/libLLVMDebugInfoPDB.a lib/libLLVMDebugInfoCodeView.a<br>lib/liblldbPluginSymbolFileSymtab.a<br>lib/liblldbPluginDynamicLoaderStatic.a<br>lib/liblldbPluginDynamicLoaderPosixDYLD.a<br>lib/liblldbPluginDynamicLoaderHexagonDYLD.a<br>lib/liblldbPluginDynamicLoaderWindowsDYLD.a<br>lib/liblldbPluginCPlusPlusLanguage.a lib/liblldbPluginGoLanguage.a<br>lib/liblldbPluginJavaLanguage.a lib/liblldbPluginObjCLanguage.a<br>lib/liblldbPluginObjCPlusPlusLanguage.a<br>lib/liblldbPluginObjectFileELF.a lib/liblldbPluginObjectFileJIT.a<br>lib/liblldbPluginSymbolVendorELF.a<br>lib/liblldbPluginObjectContainerBSDArchive.a<br>lib/liblldbPluginObjectContainerMachOArchive.a<br>lib/liblldbPluginProcessGDBRemote.a lib/liblldbPluginProcessUtility.a<br>lib/liblldbPluginPlatformAndroid.a lib/liblldbPluginPlatformGDB.a<br>lib/liblldbPluginPlatformFreeBSD.a lib/liblldbPluginPlatformKalimba.a<br>lib/liblldbPluginPlatformLinux.a lib/liblldbPluginPlatformNetBSD.a<br>lib/liblldbPluginPlatformPOSIX.a lib/liblldbPluginPlatformWindows.a<br>lib/liblldbPluginPlatformMacOSX.a<br>lib/liblldbPluginDynamicLoaderMacOSXDYLD.a<br>lib/liblldbPluginUnwindAssemblyInstEmulation.a<br>lib/liblldbPluginUnwindAssemblyX86.a<br>lib/liblldbPluginAppleObjCRuntime.a<br>lib/liblldbPluginRenderScriptRuntime.a<br>lib/liblldbPluginLanguageRuntimeGo.a<br>lib/liblldbPluginLanguageRuntimeJava.a<br>lib/liblldbPluginCXXItaniumABI.a lib/liblldbPluginABIMacOSX_arm.a<br>lib/liblldbPluginABIMacOSX_arm64.a lib/liblldbPluginABIMacOSX_i386.a<br>lib/liblldbPluginABISysV_arm.a lib/liblldbPluginABISysV_arm64.a<br>lib/liblldbPluginABISysV_i386.a lib/liblldbPluginABISysV_x86_64.a<br>lib/liblldbPluginABISysV_hexagon.a lib/liblldbPluginABISysV_ppc.a<br>lib/liblldbPluginABISysV_ppc64.a lib/liblldbPluginABISysV_mips.a<br>lib/liblldbPluginABISysV_mips64.a lib/liblldbPluginABISysV_s390x.a<br>lib/liblldbPluginInstructionARM.a lib/liblldbPluginInstructionARM64.a<br>lib/liblldbPluginInstructionMIPS.a<br>lib/liblldbPluginInstructionMIPS64.a<br>lib/liblldbPluginObjectFilePECOFF.a lib/liblldbPluginOSGo.a<br>lib/liblldbPluginOSPython.a lib/liblldbPluginMemoryHistoryASan.a<br>lib/liblldbPluginInstrumentationRuntimeAddressSanitizer.a<br>lib/liblldbPluginInstrumentationRuntimeThreadSanitizer.a<br>lib/liblldbPluginSystemRuntimeMacOSX.a<br>lib/liblldbPluginProcessElfCore.a lib/liblldbPluginJITLoaderGDB.a<br>lib/liblldbPluginExpressionParserClang.a<br>lib/liblldbPluginExpressionParserGo.a lib/liblldbPluginProcessLinux.a<br>lib/liblldbPluginProcessPOSIX.a -Wl,--end-group lib/libclangCodeGen.a<br>lib/libLLVMBitWriter.a lib/libLLVMCoverage.a lib/libLLVMipo.a<br>lib/libLLVMVectorize.a lib/libLLVMIRReader.a lib/libLLVMAsmParser.a<br>lib/libLLVMInstrumentation.a lib/libLLVMLinker.a<br>lib/libLLVMObjCARCOpts.a lib/libLLVMObject.a lib/libLLVMScalarOpts.a<br>lib/libLLVMInstCombine.a lib/libLLVMTarget.a<br>lib/libLLVMTransformUtils.a lib/libLLVMAnalysis.a<br>lib/libclangRewriteFrontend.a lib/libclangFrontend.a<br>lib/libclangDriver.a lib/libclangParse.a lib/libLLVMMCParser.a<br>lib/libLLVMProfileData.a lib/libLLVMOption.a lib/libclangRewrite.a<br>lib/libclangSerialization.a lib/libclangSema.a lib/libclangAnalysis.a<br>lib/libclangEdit.a lib/libclangAST.a lib/libclangLex.a<br>lib/libclangBasic.a lib/libLLVMMC.a lib/libLLVMBitReader.a<br>lib/libLLVMCore.a lib/libLLVMSupport.a -lrt -ldl -lcurses -lpthread<br>-lz -lm -Wl,-rpath,"\$ORIGIN/../lib" && :<br><br>/usr/bin/ld.gold: bin/lldb-argdumper: hidden symbol `__morestack' in<br>/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/6.2.1/libgcc.a(morestack.o)<br>is referenced by DSO<br><br>/usr/bin/ld.gold: final link failed: Bad value<br><br>clang-3.9: error: linker command failed with exit code 1 (use -v to<br>see invocation)<br><br>ninja: build stopped: subcommand failed.<br></div></div>