Commits

Matt Knepley  committed 84a021c

Builder: Use sharedLinker for all shared library creation, Logging for shared library creation

  • Participants
  • Parent commits aac3e14

Comments (0)

Files changed (1)

File config/builder.py

 
  def linkShared(self, sharedLib, libDir, tmpDir):
    osName = sys.platform
+   self.logPrint('Making shared libraries for OS %s using language %s' % (osName, self.language[-1]))
    # PCC_LINKER PCC_LINKER_FLAGS
-   linker      = self.configInfo.setCompilers.getLinker()
+   linker      = self.configInfo.setCompilers.getSharedLinker()
    linkerFlags = self.configInfo.setCompilers.getLinkerFlags()
    packageIncludes, packageLibs = self.getPackageInfo()
    extraLibs = self.configInfo.libraries.toStringNoDupes(self.configInfo.compilers.flibs+self.configInfo.compilers.cxxlibs+self.configInfo.compilers.LIBS.split(' '))+self.configInfo.CHUD.LIBS
          cmd += 'MACOSX_DEPLOYMENT_TARGET=10.5 '
        if self.configInfo.setCompilers.getLinkerFlags().find('-Wl,-commons,use_dylibs') > -1:
          flags += '-Wl,-commons,use_dylibs'
-       cmd += self.configInfo.setCompilers.getSharedLinker()+' -g  -dynamiclib -single_module -multiply_defined suppress -undefined dynamic_lookup '+flags+' -o '+sharedLib+' *.o -L'+libDir+' '+packageLibs+' '+sysLib+' '+extraLibs+' -lm -lc'
+       cmd += linker+' -g  -dynamiclib -single_module -multiply_defined suppress -undefined dynamic_lookup '+flags+' -o '+sharedLib+' *.o -L'+libDir+' '+packageLibs+' '+sysLib+' '+extraLibs+' -lm -lc'
      elif osName == 'cygwin':
        cmd = linker+' '+linkerFlags+' -shared -o '+sharedLib+' *.o '+externalLib
      else:
-       raise RuntimeError('Do not know how to make shared library for your crappy '+osName+' OS')
+       raise RuntimeError('Do not know how to make shared library for your '+osName+' OS')
      oldDir = os.getcwd()
      os.chdir(tmpDir)
      (output, error, status) = self.executeShellCommand(cmd, checkCommand = noCheckCommand, log=self.log)