summaryrefslogtreecommitdiff
path: root/modules/mono/build_scripts
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-11-23 11:24:48 +0100
committerGitHub <noreply@github.com>2019-11-23 11:24:48 +0100
commit636bc5c32f07050fb387a7f8f5f78f7dc9aef7be (patch)
treec2690484ad076171897f497786caf2148166ed62 /modules/mono/build_scripts
parent9b2073aa97770ae7f53cfa57d241c55bb2feb3d3 (diff)
parentebdd2bc474f6bb3ff124755196fa116c4fd91385 (diff)
Merge pull request #33828 from neikeq/貴様
Mono/C#: Prevent SCons from building API solutions in parallel
Diffstat (limited to 'modules/mono/build_scripts')
-rw-r--r--modules/mono/build_scripts/api_solution_build.py12
-rw-r--r--modules/mono/build_scripts/godot_tools_build.py8
2 files changed, 13 insertions, 7 deletions
diff --git a/modules/mono/build_scripts/api_solution_build.py b/modules/mono/build_scripts/api_solution_build.py
index 1fe00a3028..be54d0a679 100644
--- a/modules/mono/build_scripts/api_solution_build.py
+++ b/modules/mono/build_scripts/api_solution_build.py
@@ -55,12 +55,22 @@ def build(env_mono):
'GodotSharpEditor.dll', 'GodotSharpEditor.pdb', 'GodotSharpEditor.xml'
]
+ depend_cmd = []
+
for build_config in ['Debug', 'Release']:
output_dir = Dir('#bin').abspath
editor_api_dir = os.path.join(output_dir, 'GodotSharp', 'Api', build_config)
targets = [os.path.join(editor_api_dir, filename) for filename in target_filenames]
- cmd = env_mono.CommandNoCache(targets, [], build_api_solution,
+ cmd = env_mono.CommandNoCache(targets, depend_cmd, build_api_solution,
module_dir=os.getcwd(), solution_build_config=build_config)
env_mono.AlwaysBuild(cmd)
+
+ # Make the Release build of the API solution depend on the Debug build.
+ # We do this in order to prevent SCons from building them in parallel,
+ # which can freak out MSBuild. In many cases, one of the builds would
+ # hang indefinitely requiring a key to be pressed for it to continue.
+ depend_cmd = cmd
+
+ return depend_cmd
diff --git a/modules/mono/build_scripts/godot_tools_build.py b/modules/mono/build_scripts/godot_tools_build.py
index 35daa6d307..03aaa925f0 100644
--- a/modules/mono/build_scripts/godot_tools_build.py
+++ b/modules/mono/build_scripts/godot_tools_build.py
@@ -74,15 +74,11 @@ def build_godot_tools_project_editor(source, target, env):
copy_target(str(scons_target))
-def build(env_mono):
+def build(env_mono, api_sln_cmd):
assert env_mono['tools']
output_dir = Dir('#bin').abspath
editor_tools_dir = os.path.join(output_dir, 'GodotSharp', 'Tools')
- editor_api_dir = os.path.join(output_dir, 'GodotSharp', 'Api', 'Debug')
-
- source_filenames = ['GodotSharp.dll', 'GodotSharpEditor.dll']
- sources = [os.path.join(editor_api_dir, filename) for filename in source_filenames]
target_filenames = [
'GodotTools.dll', 'GodotTools.IdeConnection.dll', 'GodotTools.BuildLogger.dll',
@@ -97,7 +93,7 @@ def build(env_mono):
targets = [os.path.join(editor_tools_dir, filename) for filename in target_filenames]
- cmd = env_mono.CommandNoCache(targets, sources, build_godot_tools, module_dir=os.getcwd())
+ cmd = env_mono.CommandNoCache(targets, api_sln_cmd, build_godot_tools, module_dir=os.getcwd())
env_mono.AlwaysBuild(cmd)