-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.cmd
46 lines (44 loc) · 1.99 KB
/
build.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
::
:: dbj: currently does compile, does not link
::
:: USE clang-cl
::
@cls
@set CLANGCL="D:/PROD/programs/Microsoft Visual Studio/2019/Community/VC/Tools/Llvm\\bin/clang-cl.exe"
:: /Fa<file or dir/> Set assembly output file name (with /FA)
:: /Fe<file or dir/> Set output executable file name
:: /Fi<file> Set preprocess output file name (with /P)
:: /Fo<file or dir/> Set output object file (with /c)
:: /o <file or dir/> Deprecated (set output file name); use /Fe or /Fe
:: /GS- Disable buffer security check
:: /GS Enable buffer security check (default)
::
:: /WX- Do not treat warnings as errors (default)
:: /WX Treat warnings as errors
::
:: /Gd Set __cdecl as a default calling convention
::
:: /O2 Optimize for speed (like /Og /Oi /Ot /Oy /Ob2 /GF /Gy)
:: /Oi- Disable use of builtin functions
:: /Oi Enable use of builtin functions
:: /Ox Deprecated (like /Og /Oi /Ot /Oy /Ob2); use /O2
::
:: LNKR is probably useles
::
:: C:\Users\dusan\AppData\Local\Temp\program-23a601.obj :
:: fatal error LNK1112: module machine type 'x86' conflicts with target machine type 'x64'
:: clang-cl: error: linker command failed with exit code 1112 (use -v to see invocation)
::
set LNKR=/link /MACHINE:X64 /NXCOMPAT /SUBSYSTEM:CONSOLE /OPT:ICF /OPT:REF /INCREMENTAL:NO /DYNAMICBASE "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib"
::
:: release build
:: /Fa"Release\" /Fo"Release\"
@set SWITCHES=/WX- /Gd /Oi /MD /nologo /GR- /permissive- /std:c++17 /GS /W3 /Gy /O2 /fp:precise /D "_CRT_SECURE_NO_WARNINGS" /D "NDEBUG" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /D "_HAS_EXCEPTIONS=0"
::
:: compile
::
%CLANGCL% %SWITCHES% program.cpp fwk/main.cpp %LNKR%
::
@set CLANGCL=
@set SWITCHES=
@set LNKR=