Skip to content

Commit e42f2e0

Browse files
Updating msvc default configs
1 parent 308d51f commit e42f2e0

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

DefaultYAMLs/DefaultUserConfig.yaml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# List of anchors that will be aliased later
22
Templates:
3-
MSVC_CompileFlags: &MSVC_CompileFlags
4-
Flags: "/nologo /W4 /diagnostics:caret /D NDEBUG /utf-8 /Gm- /MD /EHa /TP /std:c++17 /GR /TP"
3+
vs2022_v17+_CompileFlags: &vs2022_v17+_CompileFlags
4+
Flags: "/nologo /W4 /diagnostics:caret /utf-8 /Gm- /MDd /EHar /TP /std:c++17 /GR /RTC1 /Zc:inline /Zi"
55

66
"g++_CompileRunParts": &g++_CompileRunParts
77
- Type: Once
@@ -28,10 +28,13 @@ Templates:
2828
- Type: Repeats
2929
CommandPart: " /I\"{IncludeDirectoryPath}\""
3030
- Type: Once
31-
CommandPart: " /Fo\"{OutputFileDirectory}{/}{ObjectLinkFile.Prefix}{InputFileName}{ObjectLinkFile.Extension}\" \"{InputFilePath}\""
31+
CommandPart: " /Fo\"{OutputFileDirectory}{/}{ObjectLinkFile.Prefix}{InputFileName}{ObjectLinkFile.Extension}\" \
32+
/Fd\"{OutputFileDirectory}{/}{DebugSymbolFile.Prefix}{InputFileName}{DebugSymbolFile.Extension}\" \
33+
\"{InputFilePath}\""
3234

3335
"vs2022_v17+_CompileExpectedOutputFiles": &vs2022_v17+_CompileExpectedOutputFiles
3436
- "{OutputFileDirectory}{/}{ObjectLinkFile.Prefix}{InputFileName}{ObjectLinkFile.Extension}"
37+
- "{OutputFileDirectory}{/}{DebugSymbolFile.Prefix}{InputFileName}{DebugSymbolFile.Extension}"
3538

3639
# The following fields set the prefixes and extensions for each type of the files
3740
# If the name of an object files are libtest.so and libtest2.so,
@@ -91,13 +94,14 @@ Templates:
9194
Windows: ""
9295
Unix: ""
9396
Extension:
94-
Windows: ""
97+
Windows: ".pdb"
9598
Unix: ""
9699

97100
# WARNING: All command substitutions in this file are passed directly to the shell.
98101
# Exercise caution when using variables or user-provided input in your build commands
99102
# to prevent potential security vulnerabilities.
100103

104+
# TODO(NOW): Make it auto? Or DefaultProfile?
101105
# A profile to be used if not specified while running the build script
102106
PreferredProfile: "g++"
103107

@@ -343,25 +347,25 @@ Profiles:
343347
CompileTypes:
344348
Executable:
345349
Windows:
346-
<<: *MSVC_CompileFlags
350+
<<: *vs2022_v17+_CompileFlags
347351
Executable: "CL.exe"
348352
RunParts: *vs2022_v17+_CompileRunParts
349353
ExpectedOutputFiles: *vs2022_v17+_CompileExpectedOutputFiles
350354
ExecutableShared:
351355
Windows:
352-
<<: *MSVC_CompileFlags
356+
<<: *vs2022_v17+_CompileFlags
353357
Executable: "CL.exe"
354358
RunParts: *vs2022_v17+_CompileRunParts
355359
ExpectedOutputFiles: *vs2022_v17+_CompileExpectedOutputFiles
356360
Static:
357361
Windows:
358-
<<: *MSVC_CompileFlags
362+
<<: *vs2022_v17+_CompileFlags
359363
Executable: "CL.exe"
360364
RunParts: *vs2022_v17+_CompileRunParts
361365
ExpectedOutputFiles: *vs2022_v17+_CompileExpectedOutputFiles
362366
Shared:
363367
Windows:
364-
<<: *MSVC_CompileFlags
368+
<<: *vs2022_v17+_CompileFlags
365369
Executable: "CL.exe"
366370
RunParts: *vs2022_v17+_CompileRunParts
367371
ExpectedOutputFiles: *vs2022_v17+_CompileExpectedOutputFiles
@@ -376,6 +380,7 @@ Profiles:
376380
Flags: >-
377381
/NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib
378382
oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /manifest:embed /SUBSYSTEM:CONSOLE
383+
/DEBUG /MANIFESTUAC:"level='asInvoker'"
379384
Executable: "link.exe"
380385
RunParts:
381386
- Type: Once
@@ -390,7 +395,7 @@ Profiles:
390395
Flags: >-
391396
/NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib
392397
oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /manifest:embed /SUBSYSTEM:CONSOLE
393-
/DLL
398+
/DEBUG /DLL /MANIFESTUAC:"level='asInvoker'"
394399
Executable: "link.exe"
395400
RunParts:
396401
- Type: Once
@@ -422,7 +427,7 @@ Profiles:
422427
Flags: >-
423428
/NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib
424429
oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /manifest:embed /SUBSYSTEM:CONSOLE
425-
/DLL
430+
/DEBUG /DLL /MANIFESTUAC:"level='asInvoker'"
426431
Executable: "link.exe"
427432
RunParts:
428433
- Type: Once

0 commit comments

Comments
 (0)