| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[compiler-rt] Support building runtimes for Windows on arm32 (#101462) In these environments, the architecture name is armv7; recognize that and enable the relevant runtimes. Fix building the sanitizer_common library for this target, by using the right registers for the architecture - this is similar to what 0c391133c9201ef29273554a1505ef855ce17668 did for aarch64. (Still, address sanitizer doesn't support hooking functions at runtime on armv7 or aarch64 - but other runtimes such as ubsan do work.) (cherry picked from commit 5ea9dd8c7076270695a1d90b9c73718e7d95e0bf) | 1 年前 | |
[compiler-rt] Initial support for builtins on GPU targets (#95304) Summary: This patch adds initial support to build the builtins library for GPU targets. Primarily this requires adding a few new architectures for amdgcn and nvptx64. I built this using the following invocations. console $ cmake ../compiler-rt -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -GNinja -DCMAKE_C_COMPILER_TARGET=<nvptx64-nvidia-cuda|amdgcn-amd-amdhsa> -DCMAKE_CXX_COMPILER_TARGET=<nvptx64-nvidia-cuda|amdgcn-amd-amdhsa> -DCMAKE_C_COMPILER_WORKS=1 -DCMAKE_CXX_COMPILER_WORKS=1 -DLLVM_CMAKE_DIR=../cmake/Modules -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON -C ../compiler-rt/cmake/caches/GPU.cmake Some pointers would be appreciated for how to test this using a standard (non-default target only) build. GPU builds are somewhat finnicky. We only expect this to be built with a sufficiently new clang, as it's the only compiler that supports the target and output we distribute. Distribution is done as LLVM-IR blobs for now. GPUs have little backward compatibility, so linking object files is left to a future patch. More work is necessary to build correctly for all targets and ship into the correct clang resource directory. Additionally we need to use the libc project's support for running unit tests. | 2 年前 | |
[compiler-rt] Cleanup use of COMPILER_RT_INCLUDE_TESTS (#98246) 1. Move checks into parent test/CMakeLists.txt 2. COMPILER_RT_INCLUDE_TESTS disable both lit and gtests. Before it was very inconsistent between sanitizers. | 2 年前 | |
[compiler-rt] Initial support for builtins on GPU targets (#95304) Summary: This patch adds initial support to build the builtins library for GPU targets. Primarily this requires adding a few new architectures for amdgcn and nvptx64. I built this using the following invocations. console $ cmake ../compiler-rt -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -GNinja -DCMAKE_C_COMPILER_TARGET=<nvptx64-nvidia-cuda|amdgcn-amd-amdhsa> -DCMAKE_CXX_COMPILER_TARGET=<nvptx64-nvidia-cuda|amdgcn-amd-amdhsa> -DCMAKE_C_COMPILER_WORKS=1 -DCMAKE_CXX_COMPILER_WORKS=1 -DLLVM_CMAKE_DIR=../cmake/Modules -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON -C ../compiler-rt/cmake/caches/GPU.cmake Some pointers would be appreciated for how to test this using a standard (non-default target only) build. GPU builds are somewhat finnicky. We only expect this to be built with a sufficiently new clang, as it's the only compiler that supports the target and output we distribute. Distribution is done as LLVM-IR blobs for now. GPUs have little backward compatibility, so linking object files is left to a future patch. More work is necessary to build correctly for all targets and ship into the correct clang resource directory. Additionally we need to use the libc project's support for running unit tests. | 2 年前 | |
[asan][cmake][test] Fix finding dynamic asan runtime lib (#100083) In a runtimes build on Solaris/amd64, there are two failues: AddressSanitizer-Unit :: ./Asan-i386-calls-Dynamic-Test/failed_to_discover_tests_from_gtest AddressSanitizer-Unit :: ./Asan-i386-inline-Dynamic-Test/failed_to_discover_tests_from_gtest This happens when lit enumerates the tests with --gtest_list_tests --gtest_filter=-*DISABLED_*. The error is twofold: - The LD_LIBRARY_PATH* variables point at the 64-bit directory (lib/clang/19/lib/x86_64-pc-solaris2.11) for a 32-bit test: ld.so.1: Asan-i386-calls-Dynamic-Test: fatal: /var/llvm/local-amd64-release-stage2-A-flang-clang18-runtimes/tools/clang/stage2-bins/./lib/../lib/clang/19/lib/x86_64-pc-solaris2.11/libclang_rt.asan.so: wrong ELF class: ELFCLASS64 - While the tests are linked with -Wl,-rpath, that path always is the 64-bit directory again. Accordingly, the fix consists of two parts: - The code in compiler-rt/test/asan/Unit/lit.site.cfg.py.in to adjust the LD_LIBRARY_PATH* variables is guarded by a config.target_arch != config.host_arch condition. This is wrong in two ways: - The adjustment is always needed independent of the host arch. This is what compiler-rt/test/lit.common.cfg.py already does. - Besides, config.host_arch is ultimately set from CMAKE_HOST_SYSTEM_PROCESSOR. On Linux/x86_64, this is x86_64 (uname -m) while on Solaris/amd64 it's i386 (uname -p), explaining why the transformation is skipped on Solaris, but not on Linux. - Besides, RPATH needs to be set to the correct subdirectory, so instead of using the default arch in compiler-rt/CMakeLists.txt, this patch moves the code to a function which takes the test's arch into account. Tested on amd64-pc-solaris2.11 and x86_64-pc-linux-gnu. (cherry picked from commit c34d673b02ead039acd107f096c1f32c16b61e07) | 1 年前 | |
[compiler-rt] Build crtbegin.o/crtend.o for SerenityOS Differential Revision: https://reviews.llvm.org/D154398 | 2 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 2 年前 |