[PATCH] D145214: [TSAN] add support for riscv64

Haowei Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 6 14:25:00 PDT 2023


haowei added a comment.

Hi,

I believe you forgot to add `tsan_rtl_riscv64.S` to your patch when you land it. We are seeing build errors on our bots with following messages:

  -- Configuring done (12.3s)
  CMake Error at /b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/cmake/Modules/AddCompilerRT.cmake:357 (add_library):
    Cannot find source file:
  
      tsan_rtl_riscv64.S
  Call Stack (most recent call first):
    /b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/tsan/rtl/CMakeLists.txt:244 (add_compiler_rt_runtime)
  
  
  CMake Error at /b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/cmake/Modules/AddCompilerRT.cmake:357 (add_library):
    No SOURCES given to target: clang_rt.tsan-riscv64
  Call Stack (most recent call first):
    /b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/tsan/rtl/CMakeLists.txt:244 (add_compiler_rt_runtime)
  
  
  CMake Error at /b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/cmake/Modules/AddCompilerRT.cmake:357 (add_library):
    No SOURCES given to target: clang_rt.tsan-dynamic-riscv64
  Call Stack (most recent call first):
    /b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/tsan/rtl/CMakeLists.txt:268 (add_compiler_rt_runtime)
  
  
  CMake Generate step failed.  Build files cannot be regenerated correctly.
  [5508/5672](1) Completed 'runtimes-i386-unknown-linux-gnu'
  FAILED: runtimes/runtimes-riscv64-unknown-linux-gnu-stamps/runtimes-riscv64-unknown-linux-gnu-configure /b/s/w/ir/x/w/llvm_build/runtimes/runtimes-riscv64-unknown-linux-gnu-stamps/runtimes-riscv64-unknown-linux-gnu-configure 
  cd /b/s/w/ir/x/w/llvm_build/runtimes/runtimes-riscv64-unknown-linux-gnu-bins && /b/s/w/ir/x/w/cipd_tool/fuchsia/third_party/cmake/72c014f0086372a2bab7ed771e2ed942d6122d94331d19c95566bb25d2f962ff/bin/cmake --no-warn-unused-cli -DCMAKE_C_COMPILER=/b/s/w/ir/x/w/llvm_build/./bin/clang -DCMAKE_CXX_COMPILER=/b/s/w/ir/x/w/llvm_build/./bin/clang++ -DCMAKE_ASM_COMPILER=/b/s/w/ir/x/w/llvm_build/./bin/clang -DCMAKE_LINKER=/b/s/w/ir/x/w/llvm_build/./bin/ld.lld -DCMAKE_AR=/b/s/w/ir/x/w/llvm_build/./bin/llvm-ar -DCMAKE_RANLIB=/b/s/w/ir/x/w/llvm_build/./bin/llvm-ranlib -DCMAKE_NM=/b/s/w/ir/x/w/llvm_build/./bin/llvm-nm -DCMAKE_OBJDUMP=/b/s/w/ir/x/w/llvm_build/./bin/llvm-objdump -DCMAKE_OBJCOPY=/b/s/w/ir/x/w/llvm_build/./bin/llvm-objcopy -DCMAKE_STRIP=/b/s/w/ir/x/w/llvm_build/./bin/llvm-strip -DCMAKE_READELF=/b/s/w/ir/x/w/llvm_build/./bin/llvm-readelf -DCMAKE_C_COMPILER_TARGET=riscv64-unknown-linux-gnu -DCMAKE_CXX_COMPILER_TARGET=riscv64-unknown-linux-gnu -DCMAKE_ASM_COMPILER_TARGET=riscv64-unknown-linux-gnu -DCMAKE_INSTALL_PREFIX= -DCMAKE_SYSROOT=/b/s/w/ir/x/w/cipd/linux -DLLVM_BINARY_DIR=/b/s/w/ir/x/w/llvm_build -DLLVM_CONFIG_PATH=/b/s/w/ir/x/w/llvm_build/bin/llvm-config -DLLVM_ENABLE_WERROR=OFF -DLLVM_HOST_TRIPLE=x86_64-unknown-linux-gnu -DLLVM_HAVE_LINK_VERSION_SCRIPT=1 -DLLVM_USE_RELATIVE_PATHS_IN_DEBUG_INFO=OFF -DLLVM_USE_RELATIVE_PATHS_IN_FILES=ON "-DLLVM_LIT_ARGS=--resultdb-output=r.j -v" -DLLVM_SOURCE_PREFIX= -DPACKAGE_VERSION=18.0.0git -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAKE_PROGRAM=/b/s/w/ir/x/w/cipd_tool/fuchsia/third_party/ninja/476febc43233af3534d14a045651a4f365106e894b0998df28fa241d68733c8d/ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCOMPILER_RT_BUILD_BUILTINS=OFF -DLLVM_INCLUDE_TESTS=ON -DLLVM_ENABLE_PROJECTS_USED=ON -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON -DCMAKE_C_COMPILER_WORKS=ON -DCMAKE_CXX_COMPILER_WORKS=ON -DCMAKE_ASM_COMPILER_WORKS=ON -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON -DLLVM_RUNTIMES_TARGET=riscv64-unknown-linux-gnu -DHAVE_LLVM_LIT=ON -DLLVM_DEFAULT_TARGET_TRIPLE=riscv64-unknown-linux-gnu "-DLLVM_ENABLE_RUNTIMES=compiler-rt;libcxx;libcxxabi;libunwind" -DLLVM_USE_LINKER=lld -DCMAKE_ASM_FLAGS=--target=riscv64-unknown-linux-gnu -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_FLAGS=--target=riscv64-unknown-linux-gnu -DCMAKE_C_FLAGS=--target=riscv64-unknown-linux-gnu -DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld -DCMAKE_MODULE_LINKER_FLAGS=-fuse-ld=lld -DCMAKE_SHARED_LINKER_FLAGS=-fuse-ld=lld -DCMAKE_SYSROOT=/b/s/w/ir/x/w/cipd/focal -DCMAKE_SYSTEM_NAME=Linux -DCOMPILER_RT_BUILD_STANDALONE_LIBATOMIC=ON -DCOMPILER_RT_CAN_EXECUTE_TESTS=ON -DCOMPILER_RT_CXX_LIBRARY=libcxx -DCOMPILER_RT_USE_BUILTINS_LIBRARY=ON -DCOMPILER_RT_USE_LLVM_UNWINDER=ON -DLIBCXXABI_ENABLE_SHARED=OFF -DLIBCXXABI_INSTALL_LIBRARY=OFF -DLIBCXXABI_USE_COMPILER_RT=ON -DLIBCXXABI_USE_LLVM_UNWINDER=ON -DLIBCXX_ABI_VERSION=2 -DLIBCXX_ENABLE_SHARED=OFF -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON -DLIBCXX_USE_COMPILER_RT=ON -DLIBUNWIND_ENABLE_SHARED=OFF -DLIBUNWIND_USE_COMPILER_RT=ON -DLLVM_ENABLE_ASSERTIONS=OFF "-DLLVM_ENABLE_RUNTIMES=compiler-rt;libcxx;libcxxabi;libunwind" -DLLVM_TOOLS_DIR=/b/s/w/ir/x/w/llvm_build/bin -DSANITIZER_CXX_ABI=libc++ -DSANITIZER_CXX_ABI_INTREE=ON -DSANITIZER_TEST_CXX=libc++ -DSANITIZER_TEST_CXX_INTREE=ON -GNinja -S /b/s/w/ir/x/w/llvm-llvm-project/llvm/runtimes/../../runtimes -B /b/s/w/ir/x/w/llvm_build/runtimes/runtimes-riscv64-unknown-linux-gnu-bins && /b/s/w/ir/x/w/cipd_tool/fuchsia/third_party/cmake/72c014f0086372a2bab7ed771e2ed942d6122d94331d19c95566bb25d2f962ff/bin/cmake -E touch /b/s/w/ir/x/w/llvm_build/runtimes/runtimes-riscv64-unknown-linux-gnu-stamps/runtimes-riscv64-unknown-linux-gnu-configure
  ninja: build stopped: subcommand failed.

Failed build task: https://ci.chromium.org/ui/p/fuchsia/builders/toolchain.ci/clang-linux-x64-rbe/b8767953001421733361/overview
Full stdout/err: https://logs.chromium.org/logs/fuchsia/buildbucket/cr-buildbucket/8767953001421733361/+/u/clang/build/stdout

Could you either add this file or revert your change please. Thanks.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145214/new/

https://reviews.llvm.org/D145214



More information about the cfe-commits mailing list