Browse Source

makepanda: Fix default selection of gcc/clang on macOS/FreeBSD

It seems that SetTarget() isn't called when not doing a cross build
rdb 2 years ago
parent
commit
c021975283
1 changed files with 6 additions and 2 deletions
  1. 6 2
      makepanda/makepandacore.py

+ 6 - 2
makepanda/makepandacore.py

@@ -46,8 +46,12 @@ ANDROID_API = None
 SYS_LIB_DIRS = []
 SYS_INC_DIRS = []
 DEBUG_DEPENDENCIES = False
-DEFAULT_CC = "gcc"
-DEFAULT_CXX = "g++"
+if sys.platform == "darwin" or sys.platform.startswith("freebsd"):
+    DEFAULT_CC = "clang"
+    DEFAULT_CXX = "clang++"
+else:
+    DEFAULT_CC = "gcc"
+    DEFAULT_CXX = "g++"
 DEFAULT_AR = "ar"
 DEFAULT_RANLIB = "ranlib"