Download patches/llvm_rusty_v8_custom_libcxx.patch from SaylorTwift/codex: direct link, hf CLI and curl.
- Browser
- Download file 4.21 kB
-
https://huggingface.co/SaylorTwift/codex/resolve/main/patches/llvm_rusty_v8_custom_libcxx.patch
- Command line
-
hf download hf://SaylorTwift/codex/patches/llvm_rusty_v8_custom_libcxx.patch
-
curl -L -o llvm_rusty_v8_custom_libcxx.patch https://huggingface.co/SaylorTwift/codex/resolve/main/patches/llvm_rusty_v8_custom_libcxx.patch
4.21 kB
| diff --git a/toolchain/BUILD.bazel b/toolchain/BUILD.bazel | |
| index fa00156236..c9e4348172 100644 | |
| --- a/toolchain/BUILD.bazel | |
| +++ b/toolchain/BUILD.bazel | |
| 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") | |
| 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 = { | |
| 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", | |
| 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 | |
| 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({ | |
| 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", | |