From 8a0bea5a9ce33439a04b566719ace108afcc51df Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Fri, 22 Sep 2023 15:01:56 +0200 Subject: added linker/compile options for determinism (#420) --- xmake.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'xmake.lua') diff --git a/xmake.lua b/xmake.lua index 10118d13f..df44dc7e6 100644 --- a/xmake.lua +++ b/xmake.lua @@ -76,8 +76,12 @@ if is_os("windows") then "WIN32_LEAN_AND_MEAN", -- cut down Windows.h "_WIN32_WINNT=0x0A00" ) - add_cxxflags("/d1trimfile:$(curdir)\\") - add_cxxflags("/Zc:preprocessor") -- Enable preprocessor conformance mode + -- Make builds more deterministic and portable + add_cxxflags("/d1trimfile:$(curdir)\\") -- eliminates the base path from __FILE__ paths + add_cxxflags("/experimental:deterministic") -- (more) deterministic compiler output + add_ldflags("/PDBALTPATH:%_PDB%") -- deterministic pdb reference in exe + + add_cxxflags("/Zc:preprocessor") -- Enable preprocessor conformance mode -- add_ldflags("/MAP") end -- cgit v1.2.3 From 1540407efbaa6dd12050b703be7bd2729665a468 Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Fri, 22 Sep 2023 15:52:59 +0200 Subject: added support for sln on Mac (#421) this makes it so users can use xmake sln on Mac as well as Windows to generate IDE files --- xmake.lua | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'xmake.lua') diff --git a/xmake.lua b/xmake.lua index df44dc7e6..deb541590 100644 --- a/xmake.lua +++ b/xmake.lua @@ -190,11 +190,17 @@ task("precommit") task("sln") set_menu { usage = "xmake sln", - description = "Generate Visual Studio project files", + description = "Generate IDE project files", } - on_run(function () - print(os.exec("xmake project --yes --kind=vsxmake2022 -m release,debug -a x64")) - end) + if is_os("windows") then + on_run(function () + print(os.exec("xmake project --yes --kind=vsxmake2022 -m release,debug -a x64")) + end) + elseif is_os("macosx") then + on_run(function () + print(os.exec("xmake project --yes --kind=xcode -m release,debug -a x64,arm64")) + end) + end task("test") set_menu { -- cgit v1.2.3