mirror of
https://github.com/odin-lang/Odin.git
synced 2026-06-19 08:32:33 +00:00
Remove -stack-protector:default as none is now the default
This commit is contained in:
@@ -279,7 +279,6 @@ enum RelocMode : u8 {
|
||||
};
|
||||
|
||||
enum StackProtector : u8 {
|
||||
StackProtector_Default,
|
||||
StackProtector_None,
|
||||
StackProtector_Ssp,
|
||||
StackProtector_SspReq,
|
||||
@@ -1955,17 +1954,14 @@ gb_internal void init_build_context(TargetMetrics *cross_target, Subtarget subta
|
||||
}
|
||||
|
||||
if (metrics->os == TargetOs_windows ||
|
||||
metrics->os == TargetOs_darwin ||
|
||||
metrics->os == TargetOs_linux ||
|
||||
metrics->os == TargetOs_freebsd ||
|
||||
metrics->os == TargetOs_openbsd ||
|
||||
metrics->os == TargetOs_netbsd) {
|
||||
if (bc->stack_protector == StackProtector_Default) {
|
||||
bc->stack_protector = StackProtector_None;
|
||||
}
|
||||
metrics->os == TargetOs_darwin ||
|
||||
metrics->os == TargetOs_linux ||
|
||||
metrics->os == TargetOs_freebsd ||
|
||||
metrics->os == TargetOs_openbsd ||
|
||||
metrics->os == TargetOs_netbsd) {
|
||||
// -stack-protector is supported
|
||||
} else {
|
||||
if (bc->stack_protector != StackProtector_Default &&
|
||||
bc->stack_protector != StackProtector_None) {
|
||||
if (bc->stack_protector != StackProtector_None) {
|
||||
gb_printf_err("-stack-protector is not supported on this target\n");
|
||||
gb_exit(1);
|
||||
}
|
||||
|
||||
@@ -1441,9 +1441,7 @@ gb_internal bool parse_build_flags(Array<String> args) {
|
||||
case BuildFlag_StackProtector: {
|
||||
GB_ASSERT(value.kind == ExactValue_String);
|
||||
String v = value.value_string;
|
||||
if (v == "default") {
|
||||
build_context.stack_protector = StackProtector_Default;
|
||||
} else if (v == "none") {
|
||||
if (v == "none") {
|
||||
build_context.stack_protector = StackProtector_None;
|
||||
} else if (v == "base") {
|
||||
build_context.stack_protector = StackProtector_Ssp;
|
||||
@@ -1453,7 +1451,6 @@ gb_internal bool parse_build_flags(Array<String> args) {
|
||||
build_context.stack_protector = StackProtector_SspStrong;
|
||||
} else {
|
||||
gb_printf_err("-stack-protector flag expected one of the following\n");
|
||||
gb_printf_err("\tdefault\n");
|
||||
gb_printf_err("\tnone\n");
|
||||
gb_printf_err("\tbase\n");
|
||||
gb_printf_err("\tall\n");
|
||||
|
||||
Reference in New Issue
Block a user