mirror of
https://github.com/openai/codex.git
synced 2026-12-06 01:10:58 +00:00
Migrate the Windows MXC sandbox to mxc-sdk (#55378)
- Replace the separate MXC crates with `mxc-sdk` and adapt request construction to its policy and optional environment fields.
- Preserve the native availability probe by caching successful process security environment creation and startup attribute initialization without launching a process.
- Use the SDK's native denied-path support check and configure Bazel resource compilation for Windows GNU targets.
Extend the request construction test to verify that nonempty environments use `Some` and empty environments use `None`.
GitOrigin-RevId: 2765c8fd19ee60661b0ce7cb3cba51acadda201a
(cherry picked from commit c6e29b4fcb)
This commit is contained in:
+18
-17
@@ -491,23 +491,24 @@ crate.annotation(
|
||||
workspace_cargo_toml = "rust/runfiles/Cargo.toml",
|
||||
)
|
||||
|
||||
# MXC keeps its Rust workspace below the repository root.
|
||||
[
|
||||
crate.annotation(
|
||||
crate = name,
|
||||
workspace_cargo_toml = "src/Cargo.toml",
|
||||
)
|
||||
for name in [
|
||||
"appcontainer_common",
|
||||
"learning_mode_core",
|
||||
"learning_mode_windows",
|
||||
"mxc_config_contract",
|
||||
"mxc_telemetry",
|
||||
"process_security_environment_spec",
|
||||
"sandbox_spec",
|
||||
"wxc_common",
|
||||
]
|
||||
]
|
||||
# MXC's resource compiler lookup needs an explicit path for Windows GNU targets.
|
||||
crate.annotation(
|
||||
build_script_deps = [
|
||||
"@crates//:cc-1.2.55",
|
||||
"@crates//:winresource-0.1.34",
|
||||
],
|
||||
build_script_env = {
|
||||
"RC_PATH": "$(execpath @llvm//tools:llvm-rc)",
|
||||
},
|
||||
build_script_tools = [
|
||||
"@llvm//tools:clang",
|
||||
"@llvm//tools:llvm-rc",
|
||||
],
|
||||
crate = "mxc-sdk",
|
||||
patch_args = ["-p1"],
|
||||
patches = ["//patches:mxc-sdk_utf8_resources.patch"],
|
||||
workspace_cargo_toml = "src/Cargo.toml",
|
||||
)
|
||||
|
||||
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user