summaryrefslogtreecommitdiff
path: root/ninja/platform_helper.py
diff options
context:
space:
mode:
Diffstat (limited to 'ninja/platform_helper.py')
-rw-r--r--ninja/platform_helper.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/ninja/platform_helper.py b/ninja/platform_helper.py
index b7447a1a122..de102b51e8c 100644
--- a/ninja/platform_helper.py
+++ b/ninja/platform_helper.py
@@ -21,8 +21,8 @@ def platforms():
return ['linux', 'darwin', 'freebsd', 'openbsd', 'solaris', 'sunos5',
'mingw', 'msvc', 'gnukfreebsd8', 'bitrig']
-class Platform( object ):
- def __init__( self, platform):
+class Platform(object):
+ def __init__(self, platform):
self._platform = platform
if not self._platform is None:
return
@@ -56,6 +56,14 @@ class Platform( object ):
def is_msvc(self):
return self._platform == 'msvc'
+ def msvc_needs_fs(self):
+ import subprocess
+ popen = subprocess.Popen(['cl', '/nologo', '/?'],
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
+ out, err = popen.communicate()
+ return '/FS ' in str(out)
+
def is_windows(self):
return self.is_mingw() or self.is_msvc()