Skip to content

Commit ba751a5

Browse files
authored
Adjust some compiler options (#1916)
1 parent b871486 commit ba751a5

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

build/Helpers.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ actionbuilddir = path.join(builddir, _ACTION == "gmake2" and "gmake" or (_ACTION
6363
bindircfg = path.join(bindir, "%{cfg.buildcfg}");
6464
prjobjdir = path.join(objsdir, "%{prj.name}", "%{cfg.buildcfg}")
6565

66-
msvc_buildflags = { "/MP", "/wd4267" }
66+
msvc_buildflags = { "/wd4267" }
6767
msvc_cpp_defines = { }
6868
default_gcc_version = "9.0.0"
6969
generate_build_config = true
@@ -98,6 +98,9 @@ function SetupNativeProject()
9898
location (path.join(actionbuilddir, "projects"))
9999
files { "*.lua" }
100100
cppdialect "c++17"
101+
flags { "MultiProcessorCompile" }
102+
justmycode "On"
103+
functionlevellinking "On"
101104

102105
if os.getenv("CPPSHARP_RELEASE") == "true" then
103106
symbols "off"
@@ -110,6 +113,8 @@ function SetupNativeProject()
110113
defines { "DEBUG" }
111114
optimize "Debug"
112115
runtime "Release"
116+
intrinsics "On"
117+
inlining "Explicit"
113118

114119
filter { "configurations:Release" }
115120
defines { "NDEBUG" }

build/Tests.lua

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function SetupManagedTestProject()
3636
enabledefaultcompileitems "false"
3737
kind "SharedLib"
3838
language "C#"
39-
clr "Unsafe"
39+
clr "NetCore"
4040
files { "*.lua" }
4141
end
4242

@@ -101,6 +101,12 @@ function SetupTestProjectsCLI(name, extraFiles, suffix)
101101
kind "SharedLib"
102102
language "C++"
103103
clr "NetCore"
104+
105+
filter { "configurations:Debug*" }
106+
assemblydebug "On"
107+
108+
filter {}
109+
104110
targetdir (path.join(gendir, name))
105111

106112
dependson { name .. ".Gen" }

src/CppParser/Bindings/CLI/premake5.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ project "CppSharp.Parser.CLI"
99
dependson { "CppSharp.CppParser" }
1010
flags { common_flags }
1111
clr "NetCore"
12+
13+
filter { "configurations:Debug*" }
14+
assemblydebug "On"
1215

1316
filter "toolset:msc*"
1417
buildoptions { clang_msvc_flags }

0 commit comments

Comments
 (0)