Skip to content

[compiler-rt] Don't detect a versioned clang test compiler as GCC #117812

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

arichardson
Copy link
Member

I was trying to build compiler-rt with /usr/bin/clang-17 and the testsuite
failed due to the code in lit.common.cfg.py:

# GCC-ASan uses dynamic runtime by default (since config.bits is not set).
if config.compiler_id == "GNU":
    gcc_dir = os.path.dirname(config.clang)
    libasan_dir = os.path.join(gcc_dir, "..", "lib" + config.bits)
    push_dynamic_library_lookup_path(config, libasan_dir)

Fix this in two ways: First, if the test compiler matches the library
compiler, set COMPILER_RT_TEST_COMPILER_ID to CMAKE_C_COMPILER_ID. Second,
relax the regex detecting clang to allow any kind of suffix.

Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
@arichardson arichardson requested a review from compnerd December 2, 2024 18:46
@arichardson arichardson merged commit 7545283 into main Dec 2, 2024
5 of 7 checks passed
@arichardson arichardson deleted the users/arichardson/spr/compiler-rt-dont-detect-a-versioned-clang-test-compiler-as-gcc branch December 2, 2024 19:49
@thetruestblue
Copy link
Contributor

thetruestblue commented Jan 6, 2025

Seems we expect that even when we change Compiler ID, we still expect compiler rt test compiler ID to be 'Clang', and this broke our testing. Put up a PR to restore behavior in that case: #121858

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants