mirror of
https://github.com/openai/codex.git
synced 2026-08-23 13:09:46 +00:00
## What changed - Upgrade `rules_rs` from `0.0.58` to `0.0.96` and LLVM from `0.7.9` to `0.8.11`, updating extension paths, platform constraints, and compatibility patches for the current APIs. - Add native `windows-gnullvm` execution support for the argument-comment lint toolchain while retaining MSVC execution for existing cross-target builds. - Build `aws-lc-sys` through the Bazel Central Registry `aws-lc` module and `rules_rs` integration, removing the replaced crate-specific patches. GitOrigin-RevId: 9829bcdb6ac74e846b713568aac38ea2fa3c42a2
109 lines
4.1 KiB
Diff
109 lines
4.1 KiB
Diff
diff --git a/toolchain/BUILD.bazel b/toolchain/BUILD.bazel
|
|
index fa00156236..c9e4348172 100644
|
|
--- a/toolchain/BUILD.bazel
|
|
+++ b/toolchain/BUILD.bazel
|
|
@@ -1,5 +1,6 @@
|
|
load("@bazel_lib//:bzl_library.bzl", "bzl_library")
|
|
+load("@bazel_skylib//lib:selects.bzl", "selects")
|
|
load("@bazel_skylib//rules:common_settings.bzl", "string_flag", "string_setting")
|
|
load("@rules_cc//cc/toolchains:actions.bzl", "cc_action_type_set")
|
|
load("@rules_cc//cc/toolchains:artifacts.bzl", "cc_artifact_name_pattern")
|
|
load("@rules_cc//cc/toolchains/impl:documented_api.bzl", "cc_args_list")
|
|
@@ -64,6 +65,15 @@ config_setting(
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
-
|
|
+
|
|
+selects.config_setting_group(
|
|
+ name = "runtimes_all_with_rusty_v8_custom_libcxx",
|
|
+ match_all = [
|
|
+ ":runtimes_all",
|
|
+ "@@//third_party/v8:use_rusty_v8_custom_libcxx",
|
|
+ ],
|
|
+ visibility = ["//visibility:public"],
|
|
+)
|
|
+
|
|
config_setting(
|
|
name = "runtimes_stage1",
|
|
flag_values = {
|
|
@@ -270,11 +280,16 @@ cc_args_list(
|
|
|
|
# TODO(cerisier): extract those into proper semantic args list.
|
|
# TODO(zbarsky): This must match llvm/toolchains/llvm.bzl
|
|
+_DEFAULT_CXXSTDLIB_HEADER_ARGS = select({
|
|
+ "@@//third_party/v8:use_rusty_v8_custom_libcxx": [],
|
|
+ "//conditions:default": [
|
|
+ "//toolchain/args:cxxstdlib_headers_include_search_paths",
|
|
+ ],
|
|
+})
|
|
+
|
|
cc_args_list(
|
|
name = "linux_toolchain_args",
|
|
- args = [
|
|
- "//toolchain/args:cxxstdlib_headers_include_search_paths",
|
|
- ] + select({
|
|
+ args = _DEFAULT_CXXSTDLIB_HEADER_ARGS + select({
|
|
"//platforms/config:musl": [
|
|
"//toolchain/args/linux:kernel_headers_include_search_paths",
|
|
"//toolchain/args/linux:musl_libc_headers_include_search_paths",
|
|
@@ -302,8 +317,7 @@ cc_args_list(
|
|
# TODO(zbarsky): This must match llvm/toolchains/llvm.bzl
|
|
cc_args_list(
|
|
name = "windows_toolchain_args",
|
|
- args = [
|
|
- "//toolchain/args:cxxstdlib_headers_include_search_paths",
|
|
+ args = _DEFAULT_CXXSTDLIB_HEADER_ARGS + [
|
|
"//toolchain/args/windows:mingw_headers_include_search_paths",
|
|
],
|
|
)
|
|
diff --git a/toolchain/llvm/llvm.bzl b/toolchain/llvm/llvm.bzl
|
|
index d36d8b94bd..900aa908d5 100644
|
|
--- a/toolchain/llvm/llvm.bzl
|
|
+++ b/toolchain/llvm/llvm.bzl
|
|
@@ -297,18 +297,23 @@ def declare_llvm_targets(*, suffix = ""):
|
|
],
|
|
)
|
|
|
|
+ default_cxxstdlib_target_headers = select({
|
|
+ "@llvm//toolchain:runtimes_all_with_rusty_v8_custom_libcxx": [],
|
|
+ "@llvm//toolchain:runtimes_stage1": [],
|
|
+ "@llvm//toolchain:runtimes_stage1_hosted": [],
|
|
+ "@llvm//toolchain:runtimes_none": [],
|
|
+ "//conditions:default": [
|
|
+ "@llvm//runtimes/cxxstdlib:headers_include_search_directory",
|
|
+ "@llvm//runtimes/cxxstdlib:abi_headers_include_search_directory",
|
|
+ ],
|
|
+ })
|
|
+
|
|
# This must match //toolchain:linux_toolchain_args
|
|
include_path(
|
|
name = "linux_target_headers",
|
|
srcs = [
|
|
":builtin_resource_dir",
|
|
- ] + select({
|
|
- "@llvm//toolchain:runtimes_all": [
|
|
- "@llvm//runtimes/cxxstdlib:headers_include_search_directory",
|
|
- "@llvm//runtimes/cxxstdlib:abi_headers_include_search_directory",
|
|
- ],
|
|
- "//conditions:default": [],
|
|
- }) + [
|
|
+ ] + default_cxxstdlib_target_headers + [
|
|
"@kernel_headers//:kernel_headers_directory",
|
|
"@llvm//sanitizers:sanitizers_headers_include_search_directory",
|
|
] + select({
|
|
@@ -324,13 +329,7 @@ def declare_llvm_targets(*, suffix = ""):
|
|
name = "windows_target_headers",
|
|
srcs = [
|
|
":builtin_resource_dir",
|
|
- ] + select({
|
|
- "@llvm//toolchain:runtimes_all": [
|
|
- "@llvm//runtimes/cxxstdlib:headers_include_search_directory",
|
|
- "@llvm//runtimes/cxxstdlib:abi_headers_include_search_directory",
|
|
- ],
|
|
- "//conditions:default": [],
|
|
- }) + [
|
|
+ ] + default_cxxstdlib_target_headers + [
|
|
"@mingw//:mingw_generated_headers_crt_directory",
|
|
"@mingw//:mingw_w64_headers_include_directory",
|
|
"@mingw//:mingw_w64_headers_crt_directory",
|