Commits

Gary Oberbrunner committed 4574609

Applied patch from #2433: support -dylib_file in ParseFlags

Comments (0)

Files changed (4)

 
 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.
 
   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.
 
   Thanks to
   Dirk Baechle,
+  Vincent Beffara,
   Jean-Fran�ois Colson,
   Bauke Conijn,
   Bill Deegan,

src/engine/SCons/Environment.py

                    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:])

src/engine/SCons/EnvironmentTests.py

             "-frameworkdir=fwd1 " + \
             "-Ffwd2 " + \
             "-F fwd3 " + \
+            "-dylib_file foo-dylib " + \
             "-pthread " + \
             "-fopenmp " + \
             "-mno-cygwin -mwindows " + \
         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',
                                 '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']