mirror of
https://github.com/openai/codex.git
synced 2026-10-31 19:28:49 +00:00
build: remove MSVC from Windows Bazel build actions
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
load("@rules_cc//cc:cc_test.bzl", "cc_test")
|
||||
|
||||
cc_test(
|
||||
name = "stack-protector-probe",
|
||||
srcs = ["stack_protector_probe.c"],
|
||||
copts = ["-fstack-protector-all"],
|
||||
tags = ["manual"],
|
||||
target_compatible_with = [
|
||||
"@platforms//os:windows",
|
||||
"@rules_rs//rs/experimental/platforms/constraints:windows_gnullvm",
|
||||
],
|
||||
)
|
||||
@@ -0,0 +1,11 @@
|
||||
#if !defined(_WIN32)
|
||||
#error "this probe must be compiled for Windows"
|
||||
#endif
|
||||
|
||||
__attribute__((noinline)) static int protected_value(int value) {
|
||||
volatile char buffer[32] = {0};
|
||||
buffer[0] = (char)value;
|
||||
return buffer[0];
|
||||
}
|
||||
|
||||
int main(void) { return protected_value(7) == 7 ? 0 : 1; }
|
||||
Reference in New Issue
Block a user