summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2021-02-12 22:28:53 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2021-04-13 20:56:49 (GMT)
commit046e37f25cd64f30e0fea7ac12bb59e89e390d31 (patch)
treee9344b11e6107ff9b1281fd2d13c36ec03807a4e
parentcd738f88e2cef1aac653226bce6860733b8fbb44 (diff)
downloadSCons-046e37f25cd64f30e0fea7ac12bb59e89e390d31.zip
SCons-046e37f25cd64f30e0fea7ac12bb59e89e390d31.tar.gz
SCons-046e37f25cd64f30e0fea7ac12bb59e89e390d31.tar.bz2
Fix ninja tool rules for macos/ar for static libs to skip response files for now. Also fix build_libraries to have proper shlib suffix
-rw-r--r--SCons/Tool/ninjaCommon/__init__.py7
-rw-r--r--test/ninja/build_libraries.py5
-rw-r--r--testing/framework/TestCmd.py1
3 files changed, 12 insertions, 1 deletions
diff --git a/SCons/Tool/ninjaCommon/__init__.py b/SCons/Tool/ninjaCommon/__init__.py
index 090d3d8..d46d692 100644
--- a/SCons/Tool/ninjaCommon/__init__.py
+++ b/SCons/Tool/ninjaCommon/__init__.py
@@ -637,6 +637,13 @@ class NinjaState:
},
}
+ if env['PLATFORM'] == 'darwin' and env['AR'] == 'ar':
+ self.rules["AR"] = {
+ "command": "rm -f $out && $env$AR $rspc",
+ "description": "Archiving $out",
+ "pool": "local_pool",
+ }
+
self.pools = {
"local_pool": self.env.GetOption("num_jobs"),
"install_pool": self.env.GetOption("num_jobs") / 2,
diff --git a/test/ninja/build_libraries.py b/test/ninja/build_libraries.py
index a1c3282..b3c7b54 100644
--- a/test/ninja/build_libraries.py
+++ b/test/ninja/build_libraries.py
@@ -26,7 +26,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os
import TestSCons
-from TestCmd import IS_WINDOWS
+from TestCmd import IS_WINDOWS, IS_MACOS
test = TestSCons.TestSCons()
@@ -64,6 +64,9 @@ else:
lib_prefix = 'lib'
win32 = ''
+if IS_MACOS:
+ lib_suffix = '.dylib'
+
test.write('SConstruct', """
env = Environment()
env.Tool('ninja')
diff --git a/testing/framework/TestCmd.py b/testing/framework/TestCmd.py
index 333901c..903bee6 100644
--- a/testing/framework/TestCmd.py
+++ b/testing/framework/TestCmd.py
@@ -314,6 +314,7 @@ from subprocess import PIPE, STDOUT
IS_WINDOWS = sys.platform == 'win32'
+IS_MACOS = sys.platform == 'darwin'
IS_64_BIT = sys.maxsize > 2**32
IS_PYPY = hasattr(sys, 'pypy_translation_info')