Skip to content

Commit

Permalink
feat: debug flag now builds optimized on msvc (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
zaucy authored Apr 25, 2023
1 parent 411fed3 commit dae25b1
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions runtime_compile/runtime_compile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,12 @@ static void msvc_runtime_compile(
compile_proc_args.push_back("/EHsc");
compile_proc_args.push_back("/bigobj");
} else {
compile_proc_args.push_back("/O2");
compile_proc_args.push_back("/MD");
compile_proc_args.push_back("/GL");
}

compile_proc_args.push_back("/DNDEBUG");
compile_proc_args.push_back("/O2");
compile_proc_args.push_back("/GL");
compile_proc_args.push_back("/MP");

std::vector<std::filesystem::path> source_files;
Expand Down Expand Up @@ -173,6 +175,11 @@ static void msvc_runtime_compile(
compile_proc_args.push_back("/DEFAULTLIB:Advapi32");
compile_proc_args.push_back("/DEFAULTLIB:Userenv");

// Wasmer needs these
compile_proc_args.push_back("/DEFAULTLIB:Ole32");
compile_proc_args.push_back("/DEFAULTLIB:NtDll");
compile_proc_args.push_back("/DEFAULTLIB:Shell32");

if(!wasmer.empty()) {
bp::ipstream wasmer_proc_flags_stdout;
bp::child wasmer_proc_cflags(
Expand Down

0 comments on commit dae25b1

Please sign in to comment.