-
Notifications
You must be signed in to change notification settings - Fork 14.4k
[clang] Prefer clang_setup over use_clang #147437
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
base: main
Are you sure you want to change the base?
[clang] Prefer clang_setup over use_clang #147437
Conversation
Created using spr 1.3.4 [skip ci]
Created using spr 1.3.4
This patch switches over uses of use_clang to clang_setup to fix a potential race condition that has been impacting CI. This is split from the refactoring to ensure I'm not missing anything major here on the clang-tools-extra side. This should fix llvm#145703. Pull Request: llvm#147437
@llvm/pr-subscribers-clangd Author: Aiden Grossman (boomanaiden154) ChangesThis patch switches over uses of use_clang to clang_setup to fix a This is split from the refactoring to ensure I'm not missing anything This should fix #145703. Full diff: https://github.com/llvm/llvm-project/pull/147437.diff 2 Files Affected:
diff --git a/clang-tools-extra/clangd/test/lit.cfg.py b/clang-tools-extra/clangd/test/lit.cfg.py
index 489726bc9429b..8ab4309e337d1 100644
--- a/clang-tools-extra/clangd/test/lit.cfg.py
+++ b/clang-tools-extra/clangd/test/lit.cfg.py
@@ -1,7 +1,7 @@
import lit.llvm
lit.llvm.initialize(lit_config, config)
-lit.llvm.llvm_config.use_clang([], [], required=False)
+lit.llvm.llvm_config.clang_setup()
lit.llvm.llvm_config.use_default_substitutions()
config.name = "Clangd"
diff --git a/clang-tools-extra/test/lit.cfg.py b/clang-tools-extra/test/lit.cfg.py
index 9f64fd3d2ffa2..bc82a14a0aed1 100644
--- a/clang-tools-extra/test/lit.cfg.py
+++ b/clang-tools-extra/test/lit.cfg.py
@@ -42,7 +42,7 @@
config.test_exec_root = os.path.join(config.clang_tools_binary_dir, "test")
# Tools need the same environment setup as clang (we don't need clang itself).
-llvm_config.use_clang(required=False)
+llvm_config.clang_setup()
if config.clang_tidy_staticanalyzer:
config.available_features.add("static-analyzer")
|
@llvm/pr-subscribers-clang-tools-extra Author: Aiden Grossman (boomanaiden154) ChangesThis patch switches over uses of use_clang to clang_setup to fix a This is split from the refactoring to ensure I'm not missing anything This should fix #145703. Full diff: https://github.com/llvm/llvm-project/pull/147437.diff 2 Files Affected:
diff --git a/clang-tools-extra/clangd/test/lit.cfg.py b/clang-tools-extra/clangd/test/lit.cfg.py
index 489726bc9429b..8ab4309e337d1 100644
--- a/clang-tools-extra/clangd/test/lit.cfg.py
+++ b/clang-tools-extra/clangd/test/lit.cfg.py
@@ -1,7 +1,7 @@
import lit.llvm
lit.llvm.initialize(lit_config, config)
-lit.llvm.llvm_config.use_clang([], [], required=False)
+lit.llvm.llvm_config.clang_setup()
lit.llvm.llvm_config.use_default_substitutions()
config.name = "Clangd"
diff --git a/clang-tools-extra/test/lit.cfg.py b/clang-tools-extra/test/lit.cfg.py
index 9f64fd3d2ffa2..bc82a14a0aed1 100644
--- a/clang-tools-extra/test/lit.cfg.py
+++ b/clang-tools-extra/test/lit.cfg.py
@@ -42,7 +42,7 @@
config.test_exec_root = os.path.join(config.clang_tools_binary_dir, "test")
# Tools need the same environment setup as clang (we don't need clang itself).
-llvm_config.use_clang(required=False)
+llvm_config.clang_setup()
if config.clang_tidy_staticanalyzer:
config.available_features.add("static-analyzer")
|
Thank you for working on this! FWIW, I don't feel confident I can give a meaningful review given how little I know about this. @petrhosek would you be comfortable reviewing this, or know someone who would be? |
Forgot to mention but this depends on #147436. We're essentially running the same setup code, just without the part that actually depends on |
Created using spr 1.3.4 [skip ci]
This patch switches over uses of use_clang to clang_setup to fix a potential race condition that has been impacting CI. This is split from the refactoring to ensure I'm not missing anything major here on the clang-tools-extra side. This should fix llvm#145703. Pull Request: llvm#147437
This patch switches over uses of use_clang to clang_setup to fix a
potential race condition that has been impacting CI.
This is split from the refactoring to ensure I'm not missing anything
major here on the clang-tools-extra side.
This should fix #145703.