Skip to content

Commit

Permalink
Applied patch from #2433: support -dylib_file in ParseFlags
Browse files Browse the repository at this point in the history
  • Loading branch information
Gary Oberbrunner committed Mar 3, 2011
1 parent 75c21ae commit 43604ef
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/CHANGES.txt
Expand Up @@ -7,6 +7,9 @@

RELEASE 2.1.0.alpha.yyyymmdd - NEW DATE WILL BE INSERTED HERE

From Vincent Beffara:
- Support -dylib_file in pkgconfig (ParseFlags)

From Gary Oberbrunner and Sohail Somani:
- new construction variable WINDOWS_EMBED_MANIFEST to automatically
embed manifests in Windows EXEs and DLLs.
Expand Down
2 changes: 2 additions & 0 deletions src/RELEASE.txt
Expand Up @@ -80,6 +80,7 @@

IMPROVEMENTS

- ParseFlags now supports -dylib_file from pkgconfig
- New debugging options to print unlink/relinking of variant files
(--debug=duplicate) and preparation of targets (--debug=prepare).
- SCons can now generate MSVS 9.0 and 10.0 Projects and Solutions.
Expand Down Expand Up @@ -115,6 +116,7 @@

Thanks to
Dirk Baechle,
Vincent Beffara,
Jean-Fran�ois Colson,
Bauke Conijn,
Bill Deegan,
Expand Down
3 changes: 3 additions & 0 deletions src/engine/SCons/Environment.py
Expand Up @@ -723,6 +723,9 @@ def append_define(name, dict = dict):
append_next_arg_to = None
elif not arg[0] in ['-', '+']:
dict['LIBS'].append(self.fs.File(arg))
elif arg == '-dylib_file':
dict['LINKFLAGS'].append(arg)
append_next_arg_to = 'LINKFLAGS'
elif arg[:2] == '-L':
if arg[2:]:
dict['LIBPATH'].append(arg[2:])
Expand Down
9 changes: 6 additions & 3 deletions src/engine/SCons/EnvironmentTests.py
Expand Up @@ -797,6 +797,7 @@ def test_ParseFlags(self):
"-frameworkdir=fwd1 " + \
"-Ffwd2 " + \
"-F fwd3 " + \
"-dylib_file foo-dylib " + \
"-pthread " + \
"-fopenmp " + \
"-mno-cygwin -mwindows " + \
Expand All @@ -810,7 +811,7 @@ def test_ParseFlags(self):
assert d['CCFLAGS'] == ['-X', '-Wa,-as',
'-pthread', '-fopenmp', '-mno-cygwin',
('-arch', 'i386'), ('-isysroot', '/tmp'),
'+DD64'], d['CCFLAGS']
'+DD64'], repr(d['CCFLAGS'])
assert d['CPPDEFINES'] == ['FOO', ['BAR', 'value'], 'BAZ'], d['CPPDEFINES']
assert d['CPPFLAGS'] == ['-Wp,-cpp'], d['CPPFLAGS']
assert d['CPPPATH'] == ['/usr/include/fum',
Expand All @@ -823,11 +824,13 @@ def test_ParseFlags(self):
'C:\\Program Files\\ASCEND'], d['LIBPATH']
LIBS = list(map(str, d['LIBS']))
assert LIBS == ['xxx', 'yyy', 'ascend'], (d['LIBS'], LIBS)
assert d['LINKFLAGS'] == ['-Wl,-link', '-pthread', '-fopenmp',
assert d['LINKFLAGS'] == ['-Wl,-link',
'-dylib_file', 'foo-dylib',
'-pthread', '-fopenmp',
'-mno-cygwin', '-mwindows',
('-arch', 'i386'),
('-isysroot', '/tmp'),
'+DD64'], d['LINKFLAGS']
'+DD64'], repr(d['LINKFLAGS'])
assert d['RPATH'] == ['rpath1', 'rpath2', 'rpath3'], d['RPATH']


Expand Down

0 comments on commit 43604ef

Please sign in to comment.