Browse Source

makepanda: don't use -fno-rtti on macOS, it fails to compile

It appears that <tr1/functional> (included by <tr1/tuple>) uses RTTI, so we can't enable this for now.
rdb 7 years ago
parent
commit
a765c32bae
1 changed files with 3 additions and 2 deletions
  1. 3 2
      makepanda/makepanda.py

+ 3 - 2
makepanda/makepanda.py

@@ -1332,9 +1332,10 @@ def CompileCxx(obj,src,opts):
                     # Work around Apple compiler bug.
                     cmd += " -U__EXCEPTIONS"
 
-            if 'RTTI' not in opts:
+            target = GetTarget()
+            if 'RTTI' not in opts and target != "darwin":
                 # We always disable RTTI on Android for memory usage reasons.
-                if optlevel >= 4 or GetTarget() == "android":
+                if optlevel >= 4 or target == "android":
                     cmd += " -fno-rtti"
 
         if ('SSE2' in opts or not PkgSkip("SSE2")) and not arch.startswith("arm") and arch != 'aarch64':