Reland check-builtins target for LLVM_ENABLE_RUNTIMES#171941
Conversation
|
|
…)" This reverts commit e281800.
9d15c70 to
18ab56f
Compare
fixed email + recommitted with correct email. I guess that's what I get for using the Github UI :/ I did fix my settings now |
|
@petrhosek Have you had a chance to diagnose the armhf failures you were seeing with this change? I had a hypothesis here but I don't have a setup for building the armhf configuration so I haven't been able to test anything myself. |
The output name can change depending on variables such as LLVM_ENABLE_PER_TARGET_RUNTIME_DIR and set_output_name is used throughout compiler-rt to correctly construct the output name.
You're right, that logic is definitely problematic and should be fixed. The reason we haven't ran into this in the normal build though is because elsewhere we use |
|
The last time we landed this there were also issues on the powerpc bots, which appear unrelated. I think I will have to look at how to fix these first.
https://lab.llvm.org/buildbot/#/builders/64/builds/6777
https://lab.llvm.org/buildbot/#/builders/145/builds/11398 If we generously assume that the builtins are not broken under the old-style build, this seems to point to another mismatch between the lib/builtins/ and test/builtins/ config causing this -- I will see if I can spot it next week. |
|
for reference, commit c956ac3 adds the fixup for config.compiler_rt_libdir on AIX. |
|
Oh, awesome, thanks! I'll just merge this then and watch the bots. |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/27/builds/21032 Here is the relevant piece of the build log for the reference |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/66/builds/24433 Here is the relevant piece of the build log for the reference |
…mpiler-rt build
```
Target ${BUILTIN_LIB_TARGET_NAME} does not exist"
```
...during CMake configure. This appears to be caused by mismatch between
the builtin library's target name and the output name from set_output_name.
This makes sure that old-style builds still use the old target name
for the builtins target (Reverts the change to BUILTIN_LIB_TARGET_NAME
made by llvm#171941), but use the output name for naming the .sources.txt
file used for configuring builtins tests.
…mpiler-rt build After llvm#171941, some buildbots that use the old-style build are failing with: ``` Target ${BUILTIN_LIB_TARGET_NAME} does not exist" ``` ...during CMake configure. This appears to be caused by mismatch between the builtin library's target name and the output name from set_output_name. This makes sure that old-style builds still use the old target name for the builtins target (Reverts the change to BUILTIN_LIB_TARGET_NAME made by llvm#171941), but use the output name for naming the .sources.txt file used for configuring builtins tests.
|
In addition to the above two, there is also https://lab.llvm.org/buildbot/#/builders/139/builds/25097 which fails with I think #174443 is the fix for that. |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/169/builds/18652 Here is the relevant piece of the build log for the reference |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/72/builds/16868 Here is the relevant piece of the build log for the reference |
This fixes cmake error from #171941 in chrome's llvm build where we have `COMPILER_RT_BUILD_BUILTINS=OFF` and have `COMPILER_RT_TEST_BUILTINS_DIR` set. That change makes it to depend on `crt` even if we don't have it in the prebuilt dir. Log: ``` CMake Error at CMakeLists.txt:349 (add_dependencies): The dependency target "crt" of target "runtimes-test-depends" does not exist. CMake Error at /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2104 (add_dependencies): The dependency target "crt" of target "check-runtimes" does not exist. Call Stack (most recent call first): /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2145 (add_lit_target) CMakeLists.txt:353 (umbrella_lit_testsuite_end) CMake Error at /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/test/CMakeLists.txt:127 (add_dependencies): The dependency target "crt" of target "compiler-rt-test-depends" does not exist. CMake Error at /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2104 (add_dependencies): The dependency target "crt" of target "check-compiler-rt" does not exist. Call Stack (most recent call first): /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2145 (add_lit_target) /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/test/CMakeLists.txt:129 (umbrella_lit_testsuite_end) CMake Error at /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2104 (add_dependencies): The dependency target "crt" of target "check-builtins" does not exist. Call Stack (most recent call first): /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2171 (add_lit_target) /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/test/builtins/CMakeLists.txt:137 (add_lit_testsuite) ```
After #171941, there are two issues: First, some buildbots that use the old-style build are failing at: ``` Target ${BUILTIN_LIB_TARGET_NAME} does not exist" ``` Example failure: https://lab.llvm.org/buildbot/#/builders/139/builds/25097 ...during CMake configure. This appears to be caused by mismatch between the builtin library's _target_ name and the output name from set_output_name. This reverts the change to BUILTIN_LIB_TARGET_NAME made by #171941, but still use the output name for naming the .sources.txt file used for configuring builtins tests. Second, this speculatively fixes an issue caused by two builtins libraries that are produced with the same name in different directories because of `LLVM_ENABLE_PER_TARGET_RUNTIME_DIR` (e.g. `lib/clang/22/lib/i386-unknown-linux-gnu/libclang_rt.builtins.a` and `lib/clang/22/lib/x86_64-unknown-linux-gnu/libclang_rt.builtins.a`), and thus the `.sources.txt` paths alias. This causes us to run the wrong tests against one of the builtins libraries. The chosen fix is to store the .sources.txt files in `get_compiler_rt_output_dir` (which takes `LLVM_ENABLE_PER_TARGET_RUNTIME_DIR` into account) rather than `CMAKE_BINARY_DIR`. As a side-effect, this allows for the replacement of `COMPILER_RT_TEST_BUILTINS_DIR` with a simpler boolean option `COMPILER_RT_TEST_EXTERNAL_BUILTINS`. Example failure: https://lab.llvm.org/buildbot/#/builders/66/builds/24433
Reland llvm#166837 and llvm#171741 (Reverts the revert in llvm#171940) --------- Co-authored-by: Petr Hosek <phosek@google.com>
…mpiler-rt build After llvm#171941, some buildbots that use the old-style build are failing with: ``` Target ${BUILTIN_LIB_TARGET_NAME} does not exist" ``` ...during CMake configure. This appears to be caused by mismatch between the builtin library's target name and the output name from set_output_name. This makes sure that old-style builds still use the old target name for the builtins target (Reverts the change to BUILTIN_LIB_TARGET_NAME made by llvm#171941), but use the output name for naming the .sources.txt file used for configuring builtins tests.
This fixes cmake error from llvm/llvm-project#171941 in chrome's llvm build where we have `COMPILER_RT_BUILD_BUILTINS=OFF` and have `COMPILER_RT_TEST_BUILTINS_DIR` set. That change makes it to depend on `crt` even if we don't have it in the prebuilt dir. Log: ``` CMake Error at CMakeLists.txt:349 (add_dependencies): The dependency target "crt" of target "runtimes-test-depends" does not exist. CMake Error at /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2104 (add_dependencies): The dependency target "crt" of target "check-runtimes" does not exist. Call Stack (most recent call first): /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2145 (add_lit_target) CMakeLists.txt:353 (umbrella_lit_testsuite_end) CMake Error at /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/test/CMakeLists.txt:127 (add_dependencies): The dependency target "crt" of target "compiler-rt-test-depends" does not exist. CMake Error at /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2104 (add_dependencies): The dependency target "crt" of target "check-compiler-rt" does not exist. Call Stack (most recent call first): /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2145 (add_lit_target) /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/test/CMakeLists.txt:129 (umbrella_lit_testsuite_end) CMake Error at /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2104 (add_dependencies): The dependency target "crt" of target "check-builtins" does not exist. Call Stack (most recent call first): /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2171 (add_lit_target) /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/test/builtins/CMakeLists.txt:137 (add_lit_testsuite) ```
Reland llvm#166837 and llvm#171741 (Reverts the revert in llvm#171940) --------- Co-authored-by: Petr Hosek <phosek@google.com>
This fixes cmake error from llvm#171941 in chrome's llvm build where we have `COMPILER_RT_BUILD_BUILTINS=OFF` and have `COMPILER_RT_TEST_BUILTINS_DIR` set. That change makes it to depend on `crt` even if we don't have it in the prebuilt dir. Log: ``` CMake Error at CMakeLists.txt:349 (add_dependencies): The dependency target "crt" of target "runtimes-test-depends" does not exist. CMake Error at /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2104 (add_dependencies): The dependency target "crt" of target "check-runtimes" does not exist. Call Stack (most recent call first): /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2145 (add_lit_target) CMakeLists.txt:353 (umbrella_lit_testsuite_end) CMake Error at /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/test/CMakeLists.txt:127 (add_dependencies): The dependency target "crt" of target "compiler-rt-test-depends" does not exist. CMake Error at /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2104 (add_dependencies): The dependency target "crt" of target "check-compiler-rt" does not exist. Call Stack (most recent call first): /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2145 (add_lit_target) /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/test/CMakeLists.txt:129 (umbrella_lit_testsuite_end) CMake Error at /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2104 (add_dependencies): The dependency target "crt" of target "check-builtins" does not exist. Call Stack (most recent call first): /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2171 (add_lit_target) /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/test/builtins/CMakeLists.txt:137 (add_lit_testsuite) ```
After llvm#171941, there are two issues: First, some buildbots that use the old-style build are failing at: ``` Target ${BUILTIN_LIB_TARGET_NAME} does not exist" ``` Example failure: https://lab.llvm.org/buildbot/#/builders/139/builds/25097 ...during CMake configure. This appears to be caused by mismatch between the builtin library's _target_ name and the output name from set_output_name. This reverts the change to BUILTIN_LIB_TARGET_NAME made by llvm#171941, but still use the output name for naming the .sources.txt file used for configuring builtins tests. Second, this speculatively fixes an issue caused by two builtins libraries that are produced with the same name in different directories because of `LLVM_ENABLE_PER_TARGET_RUNTIME_DIR` (e.g. `lib/clang/22/lib/i386-unknown-linux-gnu/libclang_rt.builtins.a` and `lib/clang/22/lib/x86_64-unknown-linux-gnu/libclang_rt.builtins.a`), and thus the `.sources.txt` paths alias. This causes us to run the wrong tests against one of the builtins libraries. The chosen fix is to store the .sources.txt files in `get_compiler_rt_output_dir` (which takes `LLVM_ENABLE_PER_TARGET_RUNTIME_DIR` into account) rather than `CMAKE_BINARY_DIR`. As a side-effect, this allows for the replacement of `COMPILER_RT_TEST_BUILTINS_DIR` with a simpler boolean option `COMPILER_RT_TEST_EXTERNAL_BUILTINS`. Example failure: https://lab.llvm.org/buildbot/#/builders/66/builds/24433
This fixes cmake error from llvm/llvm-project#171941 in chrome's llvm build where we have `COMPILER_RT_BUILD_BUILTINS=OFF` and have `COMPILER_RT_TEST_BUILTINS_DIR` set. That change makes it to depend on `crt` even if we don't have it in the prebuilt dir. Log: ``` CMake Error at CMakeLists.txt:349 (add_dependencies): The dependency target "crt" of target "runtimes-test-depends" does not exist. CMake Error at /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2104 (add_dependencies): The dependency target "crt" of target "check-runtimes" does not exist. Call Stack (most recent call first): /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2145 (add_lit_target) CMakeLists.txt:353 (umbrella_lit_testsuite_end) CMake Error at /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/test/CMakeLists.txt:127 (add_dependencies): The dependency target "crt" of target "compiler-rt-test-depends" does not exist. CMake Error at /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2104 (add_dependencies): The dependency target "crt" of target "check-compiler-rt" does not exist. Call Stack (most recent call first): /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2145 (add_lit_target) /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/test/CMakeLists.txt:129 (umbrella_lit_testsuite_end) CMake Error at /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2104 (add_dependencies): The dependency target "crt" of target "check-builtins" does not exist. Call Stack (most recent call first): /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2171 (add_lit_target) /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/test/builtins/CMakeLists.txt:137 (add_lit_testsuite) ```
This fixes cmake error from llvm/llvm-project#171941 in chrome's llvm build where we have `COMPILER_RT_BUILD_BUILTINS=OFF` and have `COMPILER_RT_TEST_BUILTINS_DIR` set. That change makes it to depend on `crt` even if we don't have it in the prebuilt dir. Log: ``` CMake Error at CMakeLists.txt:349 (add_dependencies): The dependency target "crt" of target "runtimes-test-depends" does not exist. CMake Error at /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2104 (add_dependencies): The dependency target "crt" of target "check-runtimes" does not exist. Call Stack (most recent call first): /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2145 (add_lit_target) CMakeLists.txt:353 (umbrella_lit_testsuite_end) CMake Error at /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/test/CMakeLists.txt:127 (add_dependencies): The dependency target "crt" of target "compiler-rt-test-depends" does not exist. CMake Error at /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2104 (add_dependencies): The dependency target "crt" of target "check-compiler-rt" does not exist. Call Stack (most recent call first): /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2145 (add_lit_target) /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/test/CMakeLists.txt:129 (umbrella_lit_testsuite_end) CMake Error at /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2104 (add_dependencies): The dependency target "crt" of target "check-builtins" does not exist. Call Stack (most recent call first): /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2171 (add_lit_target) /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/test/builtins/CMakeLists.txt:137 (add_lit_testsuite) ``` (cherry picked from commit 2f06623)
This fixes cmake error from llvm/llvm-project#171941 in chrome's llvm build where we have `COMPILER_RT_BUILD_BUILTINS=OFF` and have `COMPILER_RT_TEST_BUILTINS_DIR` set. That change makes it to depend on `crt` even if we don't have it in the prebuilt dir. Log: ``` CMake Error at CMakeLists.txt:349 (add_dependencies): The dependency target "crt" of target "runtimes-test-depends" does not exist. CMake Error at /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2104 (add_dependencies): The dependency target "crt" of target "check-runtimes" does not exist. Call Stack (most recent call first): /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2145 (add_lit_target) CMakeLists.txt:353 (umbrella_lit_testsuite_end) CMake Error at /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/test/CMakeLists.txt:127 (add_dependencies): The dependency target "crt" of target "compiler-rt-test-depends" does not exist. CMake Error at /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2104 (add_dependencies): The dependency target "crt" of target "check-compiler-rt" does not exist. Call Stack (most recent call first): /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2145 (add_lit_target) /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/test/CMakeLists.txt:129 (umbrella_lit_testsuite_end) CMake Error at /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2104 (add_dependencies): The dependency target "crt" of target "check-builtins" does not exist. Call Stack (most recent call first): /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2171 (add_lit_target) /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/test/builtins/CMakeLists.txt:137 (add_lit_testsuite) ```
…LLVM_ENABLE_RUNTIMES (#187835) #171941 got the builtins tests running under LLVM_ENABLE_RUNTIMES by testing the builtins as part of the runtimes build. As a consequence, CMake in `lib/builtins/` is no longer visible when configuring the tests (but `test/builtins/` is). This means that the `cmake_dependent_option` from `lib/builtins/` is not accounted for by the tests, allowing COMPILER_RT_BUILD_CRT to be YES when COMPILER_RT_HAS_CRT is NO. As a consequence, the CRT tests are running on platforms where COMPILER_RT_HAS_CRT is false (#176892). https://github.com/llvm/llvm-project/blob/367da15a11c52886c50e7f020cb4de59fe6d07ca/compiler-rt/lib/builtins/CMakeLists.txt#L1106-L1108 Although the long-term solution could be to split both the builtins (and their tests) out of compiler-rt into a top-level directory with shared options, this works around the issue for the moment by checking both COMPILER_RT_HAS_CRT and COMPILER_RT_BUILD_CRT before enabling the "crt" feature. Fixes #176892
…LLVM_ENABLE_RUNTIMES (llvm#187835) llvm#171941 got the builtins tests running under LLVM_ENABLE_RUNTIMES by testing the builtins as part of the runtimes build. As a consequence, CMake in `lib/builtins/` is no longer visible when configuring the tests (but `test/builtins/` is). This means that the `cmake_dependent_option` from `lib/builtins/` is not accounted for by the tests, allowing COMPILER_RT_BUILD_CRT to be YES when COMPILER_RT_HAS_CRT is NO. As a consequence, the CRT tests are running on platforms where COMPILER_RT_HAS_CRT is false (llvm#176892). https://github.com/llvm/llvm-project/blob/367da15a11c52886c50e7f020cb4de59fe6d07ca/compiler-rt/lib/builtins/CMakeLists.txt#L1106-L1108 Although the long-term solution could be to split both the builtins (and their tests) out of compiler-rt into a top-level directory with shared options, this works around the issue for the moment by checking both COMPILER_RT_HAS_CRT and COMPILER_RT_BUILD_CRT before enabling the "crt" feature. Fixes llvm#176892
…LLVM_ENABLE_RUNTIMES (llvm#187835) llvm#171941 got the builtins tests running under LLVM_ENABLE_RUNTIMES by testing the builtins as part of the runtimes build. As a consequence, CMake in `lib/builtins/` is no longer visible when configuring the tests (but `test/builtins/` is). This means that the `cmake_dependent_option` from `lib/builtins/` is not accounted for by the tests, allowing COMPILER_RT_BUILD_CRT to be YES when COMPILER_RT_HAS_CRT is NO. As a consequence, the CRT tests are running on platforms where COMPILER_RT_HAS_CRT is false (llvm#176892). https://github.com/llvm/llvm-project/blob/367da15a11c52886c50e7f020cb4de59fe6d07ca/compiler-rt/lib/builtins/CMakeLists.txt#L1106-L1108 Although the long-term solution could be to split both the builtins (and their tests) out of compiler-rt into a top-level directory with shared options, this works around the issue for the moment by checking both COMPILER_RT_HAS_CRT and COMPILER_RT_BUILD_CRT before enabling the "crt" feature. Fixes llvm#176892
…LLVM_ENABLE_RUNTIMES (llvm#187835) llvm#171941 got the builtins tests running under LLVM_ENABLE_RUNTIMES by testing the builtins as part of the runtimes build. As a consequence, CMake in `lib/builtins/` is no longer visible when configuring the tests (but `test/builtins/` is). This means that the `cmake_dependent_option` from `lib/builtins/` is not accounted for by the tests, allowing COMPILER_RT_BUILD_CRT to be YES when COMPILER_RT_HAS_CRT is NO. As a consequence, the CRT tests are running on platforms where COMPILER_RT_HAS_CRT is false (llvm#176892). https://github.com/llvm/llvm-project/blob/367da15a11c52886c50e7f020cb4de59fe6d07ca/compiler-rt/lib/builtins/CMakeLists.txt#L1106-L1108 Although the long-term solution could be to split both the builtins (and their tests) out of compiler-rt into a top-level directory with shared options, this works around the issue for the moment by checking both COMPILER_RT_HAS_CRT and COMPILER_RT_BUILD_CRT before enabling the "crt" feature. Fixes llvm#176892
Reland #166837 and #171741
(Reverts the revert in #171940)