summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2004-09-24 19:33:09 (GMT)
committerSteven Knight <knight@baldmt.com>2004-09-24 19:33:09 (GMT)
commite4a3739689eac21ce5db67d606a9fe29a7695394 (patch)
tree643cbf4155da69c7053e10f88e2971d50df2352a
parent3876527265af4344a008e51bdd31839d39544965 (diff)
downloadSCons-e4a3739689eac21ce5db67d606a9fe29a7695394.zip
SCons-e4a3739689eac21ce5db67d606a9fe29a7695394.tar.gz
SCons-e4a3739689eac21ce5db67d606a9fe29a7695394.tar.bz2
Add ParseConfig() support for -mwindows and -mno-cygwin. (Clive Levinson)
-rw-r--r--src/CHANGES.txt5
-rw-r--r--src/engine/SCons/Environment.py5
-rw-r--r--src/engine/SCons/EnvironmentTests.py8
3 files changed, 15 insertions, 3 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index 4780aed..1008e8e 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -69,6 +69,11 @@ RELEASE 0.97 - XXX
- Allow a ListOption's default value(s) to be a Python list of specified
values, not just a string containing a comma-separated list of names.
+ From Clive Levinson:
+
+ - Make ParseConfig() recognize and add -mno-cygwin to $LINKFLAGS and
+ $CCFLAGS, and -mwindows to $LINKFLAGS.
+
From Elliot Murphy:
- Enhance the tests to guarantee persistence of ListOption
diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py
index ba63032..df2a93a 100644
--- a/src/engine/SCons/Environment.py
+++ b/src/engine/SCons/Environment.py
@@ -773,6 +773,11 @@ class Base:
elif arg == '-framework':
dict['LINKFLAGS'].append(arg)
append_next_arg_to='LINKFLAGS'
+ elif arg == '-mno-cygwin':
+ dict['CCFLAGS'].append(arg)
+ dict['LINKFLAGS'].append(arg)
+ elif arg == '-mwindows':
+ dict['LINKFLAGS'].append(arg)
elif arg == '-pthread':
dict['CCFLAGS'].append(arg)
dict['LINKFLAGS'].append(arg)
diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py
index 4839e2a..7023fea 100644
--- a/src/engine/SCons/EnvironmentTests.py
+++ b/src/engine/SCons/EnvironmentTests.py
@@ -1335,7 +1335,9 @@ class EnvironmentTestCase(unittest.TestCase):
def read(self):
return "-I/usr/include/fum -Ibar -X\n" + \
"-L/usr/fax -Lfoo -lxxx " + \
- "-Wa,-as -Wl,-link -Wp,-cpp abc -pthread -framework Carbon"
+ "-Wa,-as -Wl,-link -Wp,-cpp abc " + \
+ "-pthread -framework Carbon " + \
+ "-mno-cygwin -mwindows"
return fake_file()
try:
os.popen = my_popen
@@ -1346,8 +1348,8 @@ class EnvironmentTestCase(unittest.TestCase):
assert env['CPPFLAGS'] == ['', '-Wp,-cpp'], env['CPPFLAGS']
assert env['LIBPATH'] == ['list', '/usr/fax', 'foo'], env['LIBPATH']
assert env['LIBS'] == ['xxx', env.File('abc')], env['LIBS']
- assert env['LINKFLAGS'] == ['', '-Wl,-link', '-pthread', '-framework', 'Carbon'], env['LINKFLAGS']
- assert env['CCFLAGS'] == ['', '-X', '-pthread'], env['CCFLAGS']
+ assert env['LINKFLAGS'] == ['', '-Wl,-link', '-pthread', '-framework', 'Carbon', '-mno-cygwin', '-mwindows'], env['LINKFLAGS']
+ assert env['CCFLAGS'] == ['', '-X', '-pthread', '-mno-cygwin'], env['CCFLAGS']
finally:
os.popen = orig_popen