macro_name MSVC

binary_name cl
linker_name link

output_to_object "/Fo"
output_to_exe "/OUT:"

add_include_dir_option "/I"
add_lib_dir_option "/LIBPATH:"
add_lib_option ""

compile_flags "/nologo /c"

optimization_flags "/O2 /Oi"
size_optimization_flags "/O1 /Os"

# for debug info in the object file:
#debug_info_flags "/Z7"

# for using a PDB file:
debug_info_flags "/Zi /FS"

preproc_flags "/nologo /EP"

lang_flags "/EHs /GR /D_ENABLE_EXTENDED_ALIGNED_STORAGE"
warning_flags "/W4 /wd4250 /wd4251 /wd4275"

visibility_build_flags "/DBOTAN_DLL=__declspec(dllexport)"
visibility_attribute "__declspec(dllimport)"

ar_command lib
ar_options "/nologo"
ar_output_to "/OUT:"

<isa_flags>
sse2   -> ""
ssse3  -> ""
sse41 -> ""
sse42 -> ""
x86_64:avx2   -> "/arch:AVX"
bmi2   -> ""
aesni  -> ""
clmul  -> ""
rdrand -> ""
rdseed -> ""
sha    -> ""
</isa_flags>

<so_link_commands>
default       -> "$(LINKER) /DLL"
default-debug -> "$(LINKER) /DLL /DEBUG"
</so_link_commands>

<binary_link_commands>
default       -> "$(LINKER)"
default-debug -> "$(LINKER) /DEBUG"
</binary_link_commands>

<mach_abi_linking>
all              -> "/bigobj"

# These can be overridden with --msvc-runtime option
rt               -> "/MD"
rt-debug         -> "/MDd"
</mach_abi_linking>
