Files
codex/patches/toolchains_llvm_bootstrapped_resource_dir.patch
zbarsky-openai 2d8c1575b8 [bazel] Bump rules_rs and llvm (#13366)
# External (non-OpenAI) Pull Request Requirements

Before opening this Pull Request, please read the dedicated
"Contributing" markdown file or your PR may be closed:
https://github.com/openai/codex/blob/main/docs/contributing.md

If your PR conforms to our contribution guidelines, replace this text
with a detailed and high quality description of your changes.

Include a link to a bug report or enhancement request.
2026-03-04 01:59:32 +00:00

53 lines
1.5 KiB
Diff

diff --git a/toolchain/args/BUILD.bazel b/toolchain/args/BUILD.bazel
index 7da0ddb..78326d9 100644
--- a/toolchain/args/BUILD.bazel
+++ b/toolchain/args/BUILD.bazel
@@ -17,8 +17,8 @@ package(default_visibility = ["//visibility:public"])
cc_args(
name = "resource_dir",
actions = [
+ "@rules_cc//cc/toolchains/actions:compile_actions",
"@rules_cc//cc/toolchains/actions:link_actions",
- # We may need it for other actions too?
],
args = [
"-resource-dir",
@@ -32,6 +32,25 @@ cc_args(
},
)
+cc_args(
+ name = "clang_builtin_headers_include_search_paths",
+ actions = [
+ "@rules_cc//cc/toolchains/actions:compile_actions",
+ "@rules_cc//cc/toolchains/actions:link_actions",
+ ],
+ args = [
+ "-isystem",
+ "{clang_builtin_headers_include_search_path}",
+ ],
+ format = {
+ "clang_builtin_headers_include_search_path": "//:builtin_headers",
+ },
+ data = [
+ "//:builtin_headers",
+ ],
+ allowlist_include_directories = ["//:builtin_headers"],
+)
+
cc_args(
name = "llvm_target_for_platform",
actions = [
diff --git a/toolchain/BUILD.bazel b/toolchain/BUILD.bazel
index 1f89467..8f20f10 100644
--- a/toolchain/BUILD.bazel
+++ b/toolchain/BUILD.bazel
@@ -107,6 +107,7 @@ cc_args_list(
"@platforms//os:macos": [],
"//conditions:default": [
"//toolchain/args:resource_dir",
+ "//toolchain/args:clang_builtin_headers_include_search_paths",
],
}),
)