[PATCH] D103717: [InstrProfiling] Make __profd_ unconditionally private for ELF
Nathan Chancellor via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 17 22:28:15 PDT 2021
nathanchance added a comment.
This patch breaks a two stage instrumented build::
$ cmake \
-B build/stage1 \
-G Ninja \
-Wno-dev \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DLLVM_CCACHE_BUILD=ON \
-DLLVM_ENABLE_PROJECTS="clang;compiler-rt;lld" \
-DLLVM_TARGETS_TO_BUILD=host \
-DLLVM_USE_LINKER=lld \
llvm
$ ninja -C build/stage1
$ export PATH=$PWD/build/stage1/bin:$PATH
$ cmake \
-B build/stage2 \
-G Ninja \
-Wno-dev \
-DCLANG_TABLEGEN=$(command -v clang-tblgen) \
-DCMAKE_AR=$(command -v llvm-ar) \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=$(command -v clang) \
-DCMAKE_CXX_COMPILER=$(command -v clang++) \
-DCMAKE_RANLIB=$(command -v llvm-ranlib) \
-DLLVM_BUILD_INSTRUMENTED=IR \
-DLLVM_BUILD_RUNTIME=OFF \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DLLVM_ENABLE_PROJECTS="clang;lld" \
-DLLVM_ENABLE_TERMINFO=OFF \
-DLLVM_ENABLE_WARNINGS=OFF \
-DLLVM_TABLEGEN=$(command -v llvm-tblgen) \
-DLLVM_TARGETS_TO_BUILD=host \
-DLLVM_USE_LINKER=$(command -v ld.lld) \
llvm
$ ninja -C build/stage2
...
ld.lld: error: relocation refers to a discarded section: __llvm_prf_data
>>> defined in utils/TableGen/CMakeFiles/llvm-tblgen.dir/AsmWriterEmitter.cpp.o
>>> referenced by AsmWriterEmitter.cpp
>>> utils/TableGen/CMakeFiles/llvm-tblgen.dir/AsmWriterEmitter.cpp.o:((anonymous namespace)::AsmWriterEmitter::run(llvm::raw_ostream&))
>>> referenced by AsmWriterEmitter.cpp
>>> utils/TableGen/CMakeFiles/llvm-tblgen.dir/AsmWriterEmitter.cpp.o:((anonymous namespace)::AsmWriterEmitter::run(llvm::raw_ostream&))
>>> referenced by AsmWriterEmitter.cpp
>>> utils/TableGen/CMakeFiles/llvm-tblgen.dir/AsmWriterEmitter.cpp.o:((anonymous namespace)::AsmWriterEmitter::run(llvm::raw_ostream&))
>>> referenced 232 more times
ld.lld: error: relocation refers to a discarded section: __llvm_prf_data
>>> defined in utils/TableGen/CMakeFiles/llvm-tblgen.dir/AsmWriterEmitter.cpp.o
>>> referenced by AsmWriterEmitter.cpp
>>> utils/TableGen/CMakeFiles/llvm-tblgen.dir/AsmWriterEmitter.cpp.o:((anonymous namespace)::AsmWriterEmitter::run(llvm::raw_ostream&))
>>> referenced by AsmWriterEmitter.cpp
>>> utils/TableGen/CMakeFiles/llvm-tblgen.dir/AsmWriterEmitter.cpp.o:((anonymous namespace)::AsmWriterEmitter::run(llvm::raw_ostream&))
>>> referenced by AsmWriterEmitter.cpp
>>> utils/TableGen/CMakeFiles/llvm-tblgen.dir/AsmWriterEmitter.cpp.o:((anonymous namespace)::AsmWriterEmitter::run(llvm::raw_ostream&))
>>> referenced 8 more times
...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103717/new/
https://reviews.llvm.org/D103717
More information about the llvm-commits
mailing list