From 5649c5d4d83d2637de25e3893ac6ba25c104bd7b Mon Sep 17 00:00:00 2001 From: Tobiasz Laskowski Date: Fri, 25 Oct 2024 00:58:32 +0100 Subject: [PATCH 1/2] Reduce cl.exe calls in vs hlc templates Since the %(Filename) variable is unique for each compiled file, this resulted in a separate cl.exe invocation for each file. This makes us unable to make use of /MP to speed up cl.exe. We can instead simply pass the directory and the file name will be added to the end automatically. This still means that there is a separate cl.exe invocation per directory, however, this is much faster already. The %(RelativeDir) must remain otherwise all object files are placed in a single directory. This would be a problem if two files share a name. --- other/haxelib/templates/vs2015/__file__.vcxproj | 8 ++++---- other/haxelib/templates/vs2017/__file__.vcxproj | 8 ++++---- other/haxelib/templates/vs2019/__file__.vcxproj | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/other/haxelib/templates/vs2015/__file__.vcxproj b/other/haxelib/templates/vs2015/__file__.vcxproj index 79cd4e1aa..1753306b8 100644 --- a/other/haxelib/templates/vs2015/__file__.vcxproj +++ b/other/haxelib/templates/vs2015/__file__.vcxproj @@ -97,7 +97,7 @@ Disabled WIN32;_DEBUG;_CONSOLE;HL_MAKE;%(PreprocessorDefinitions) true - $(IntDir)\%(RelativeDir)\%(Filename).obj + $(IntDir)\%(RelativeDir) Console @@ -113,7 +113,7 @@ Disabled _DEBUG;_CONSOLE;HL_MAKE;%(PreprocessorDefinitions) true - $(IntDir)\%(RelativeDir)\%(Filename).obj + $(IntDir)\%(RelativeDir) Console @@ -131,7 +131,7 @@ true WIN32;NDEBUG;_CONSOLE;HL_MAKE;%(PreprocessorDefinitions) true - $(IntDir)\%(RelativeDir)\%(Filename).obj + $(IntDir)\%(RelativeDir) Console @@ -151,7 +151,7 @@ true NDEBUG;_CONSOLE;HL_MAKE;%(PreprocessorDefinitions) true - $(IntDir)\%(RelativeDir)\%(Filename).obj + $(IntDir)\%(RelativeDir) Console diff --git a/other/haxelib/templates/vs2017/__file__.vcxproj b/other/haxelib/templates/vs2017/__file__.vcxproj index 87e602be9..f503d943f 100644 --- a/other/haxelib/templates/vs2017/__file__.vcxproj +++ b/other/haxelib/templates/vs2017/__file__.vcxproj @@ -99,7 +99,7 @@ true WIN32;_DEBUG;_CONSOLE;HL_MAKE;%(PreprocessorDefinitions) true - $(IntDir)\%(RelativeDir)\%(Filename).obj + $(IntDir)\%(RelativeDir) Console @@ -116,7 +116,7 @@ true _DEBUG;_CONSOLE;HL_MAKE;%(PreprocessorDefinitions) true - $(IntDir)\%(RelativeDir)\%(Filename).obj + $(IntDir)\%(RelativeDir) Console @@ -135,7 +135,7 @@ true WIN32;NDEBUG;_CONSOLE;HL_MAKE;%(PreprocessorDefinitions) true - $(IntDir)\%(RelativeDir)\%(Filename).obj + $(IntDir)\%(RelativeDir) Console @@ -156,7 +156,7 @@ true NDEBUG;_CONSOLE;HL_MAKE;%(PreprocessorDefinitions) true - $(IntDir)\%(RelativeDir)\%(Filename).obj + $(IntDir)\%(RelativeDir) Console diff --git a/other/haxelib/templates/vs2019/__file__.vcxproj b/other/haxelib/templates/vs2019/__file__.vcxproj index 681388a68..c21a8efa9 100644 --- a/other/haxelib/templates/vs2019/__file__.vcxproj +++ b/other/haxelib/templates/vs2019/__file__.vcxproj @@ -97,7 +97,7 @@ true WIN32;_DEBUG;_CONSOLE;HL_MAKE;%(PreprocessorDefinitions) true - $(IntDir)\%(RelativeDir)\%(Filename).obj + $(IntDir)\%(RelativeDir) Console @@ -114,7 +114,7 @@ true WIN32;NDEBUG;_CONSOLE;HL_MAKE;%(PreprocessorDefinitions) true - $(IntDir)\%(RelativeDir)\%(Filename).obj + $(IntDir)\%(RelativeDir) Console @@ -131,7 +131,7 @@ true _DEBUG;_CONSOLE;HL_MAKE;%(PreprocessorDefinitions) true - $(IntDir)\%(RelativeDir)\%(Filename).obj + $(IntDir)\%(RelativeDir) Console @@ -148,7 +148,7 @@ true NDEBUG;_CONSOLE;HL_MAKE;%(PreprocessorDefinitions) true - $(IntDir)\%(RelativeDir)\%(Filename).obj + $(IntDir)\%(RelativeDir) Console From b3c2b7885291628854bfcbc250dfeceb819cfa1b Mon Sep 17 00:00:00 2001 From: Tobiasz Laskowski Date: Fri, 25 Oct 2024 01:01:41 +0100 Subject: [PATCH 2/2] Enable multi processor builds in hlc vs templates --- other/haxelib/templates/vs2015/__file__.vcxproj | 4 ++++ other/haxelib/templates/vs2017/__file__.vcxproj | 4 ++++ other/haxelib/templates/vs2019/__file__.vcxproj | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/other/haxelib/templates/vs2015/__file__.vcxproj b/other/haxelib/templates/vs2015/__file__.vcxproj index 1753306b8..84b912a51 100644 --- a/other/haxelib/templates/vs2015/__file__.vcxproj +++ b/other/haxelib/templates/vs2015/__file__.vcxproj @@ -98,6 +98,7 @@ WIN32;_DEBUG;_CONSOLE;HL_MAKE;%(PreprocessorDefinitions) true $(IntDir)\%(RelativeDir) + true Console @@ -114,6 +115,7 @@ _DEBUG;_CONSOLE;HL_MAKE;%(PreprocessorDefinitions) true $(IntDir)\%(RelativeDir) + true Console @@ -132,6 +134,7 @@ WIN32;NDEBUG;_CONSOLE;HL_MAKE;%(PreprocessorDefinitions) true $(IntDir)\%(RelativeDir) + true Console @@ -152,6 +155,7 @@ NDEBUG;_CONSOLE;HL_MAKE;%(PreprocessorDefinitions) true $(IntDir)\%(RelativeDir) + true Console diff --git a/other/haxelib/templates/vs2017/__file__.vcxproj b/other/haxelib/templates/vs2017/__file__.vcxproj index f503d943f..d19e6c727 100644 --- a/other/haxelib/templates/vs2017/__file__.vcxproj +++ b/other/haxelib/templates/vs2017/__file__.vcxproj @@ -100,6 +100,7 @@ WIN32;_DEBUG;_CONSOLE;HL_MAKE;%(PreprocessorDefinitions) true $(IntDir)\%(RelativeDir) + true Console @@ -117,6 +118,7 @@ _DEBUG;_CONSOLE;HL_MAKE;%(PreprocessorDefinitions) true $(IntDir)\%(RelativeDir) + true Console @@ -136,6 +138,7 @@ WIN32;NDEBUG;_CONSOLE;HL_MAKE;%(PreprocessorDefinitions) true $(IntDir)\%(RelativeDir) + true Console @@ -157,6 +160,7 @@ NDEBUG;_CONSOLE;HL_MAKE;%(PreprocessorDefinitions) true $(IntDir)\%(RelativeDir) + true Console diff --git a/other/haxelib/templates/vs2019/__file__.vcxproj b/other/haxelib/templates/vs2019/__file__.vcxproj index c21a8efa9..b60046468 100644 --- a/other/haxelib/templates/vs2019/__file__.vcxproj +++ b/other/haxelib/templates/vs2019/__file__.vcxproj @@ -98,6 +98,7 @@ WIN32;_DEBUG;_CONSOLE;HL_MAKE;%(PreprocessorDefinitions) true $(IntDir)\%(RelativeDir) + true Console @@ -115,6 +116,7 @@ WIN32;NDEBUG;_CONSOLE;HL_MAKE;%(PreprocessorDefinitions) true $(IntDir)\%(RelativeDir) + true Console @@ -132,6 +134,7 @@ _DEBUG;_CONSOLE;HL_MAKE;%(PreprocessorDefinitions) true $(IntDir)\%(RelativeDir) + true Console @@ -149,6 +152,7 @@ NDEBUG;_CONSOLE;HL_MAKE;%(PreprocessorDefinitions) true $(IntDir)\%(RelativeDir) + true Console