1. petsc
  2. PETSc
  3. buildsystem-3.3

Commits

Jed Brown  committed fc0eb7d

Try to fix clang++ to use -x c++, but disable because of Clang bug

  • Participants
  • Parent commits d5ea201
  • Branches default

Comments (0)

Files changed (2)

File config/compilerFlags.py

View file
           else:
             flags = options.getCompilerFlags(language, self.setCompilers.getCompiler(), bopt)
           for testFlag in flags:
+            if isinstance(testFlag,tuple):
+              testFlag = ' '.join(testFlag)
             try:
               self.framework.logPrint('Trying '+language+' compiler flag '+testFlag)
               self.setCompilers.addCompilerFlag(testFlag)

File config/compilerOptions.py

View file
     if config.setCompilers.Configure.isGNU(compiler) or config.setCompilers.Configure.isClang(compiler):
       if bopt == '':
         flags.extend(['-Wall', '-Wwrite-strings', '-Wno-strict-aliasing','-Wno-unknown-pragmas'])
+        # The option below would prevent warnings about compiling C as C++ being deprecated, but it causes Clang to SEGV, http://llvm.org/bugs/show_bug.cgi?id=12924
+        # flags.extend([('-x','c++')])
         if self.framework.argDB['with-visibility']:
           flags.extend(['-fvisibility=hidden'])
       elif bopt in ['g']: