aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2023-01-14 13:42:29 +0000
committergingerBill <bill@gingerbill.org>2023-01-14 13:42:29 +0000
commitb0619980b2375dcb882057a78b6a44530f7bd7e9 (patch)
treece4b429e52e8636f9d80488f8969684d921d855f /src/main.cpp
parent9aa9429135930fcdb51c99c908c604d348443212 (diff)
Add `/NOIMPLIB /NOEXP` on MSVC linker by default when building an executable
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index de7fea344..ef827c77c 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -322,6 +322,12 @@ gb_internal i32 linker_stage(lbGenerator *gen) {
}
}
+ switch (build_context.build_mode) {
+ case BuildMode_Executable:
+ link_settings = gb_string_append_fmt(link_settings, " /NOIMPLIB /NOEXP");
+ break;
+ }
+
result = system_exec_command_line_app("msvc-link",
"\"%.*slink.exe\" %s %.*s -OUT:\"%.*s\" %s "
"/nologo /incremental:no /opt:ref /subsystem:%s "