|
@@ -40,6 +40,8 @@ SYS_INC_DIRS = []
|
|
|
DEBUG_DEPENDENCIES = False
|
|
DEBUG_DEPENDENCIES = False
|
|
|
DEFAULT_CC = "gcc"
|
|
DEFAULT_CC = "gcc"
|
|
|
DEFAULT_CXX = "g++"
|
|
DEFAULT_CXX = "g++"
|
|
|
|
|
+DEFAULT_AR = "ar"
|
|
|
|
|
+DEFAULT_RANLIB = "ranlib"
|
|
|
|
|
|
|
|
# Is the current Python a 32-bit or 64-bit build? There doesn't
|
|
# Is the current Python a 32-bit or 64-bit build? There doesn't
|
|
|
# appear to be a universal test for this.
|
|
# appear to be a universal test for this.
|
|
@@ -357,9 +359,11 @@ def SetTarget(target, arch=None):
|
|
|
exit('Should specify an architecture when building for Linux')
|
|
exit('Should specify an architecture when building for Linux')
|
|
|
|
|
|
|
|
elif target == 'emscripten':
|
|
elif target == 'emscripten':
|
|
|
- global DEFAULT_CC, DEFAULT_CXX
|
|
|
|
|
|
|
+ global DEFAULT_CC, DEFAULT_CXX, DEFAULT_AR, DEFAULT_RANLIB
|
|
|
DEFAULT_CC = "emcc"
|
|
DEFAULT_CC = "emcc"
|
|
|
DEFAULT_CXX = "em++"
|
|
DEFAULT_CXX = "em++"
|
|
|
|
|
+ DEFAULT_AR = "emar"
|
|
|
|
|
+ DEFAULT_RANLIB = "emranlib"
|
|
|
|
|
|
|
|
elif target == host:
|
|
elif target == host:
|
|
|
if arch is None or arch == host_arch:
|
|
if arch is None or arch == host_arch:
|
|
@@ -417,16 +421,16 @@ def GetStrip():
|
|
|
def GetAR():
|
|
def GetAR():
|
|
|
# Hack
|
|
# Hack
|
|
|
if TARGET == 'android':
|
|
if TARGET == 'android':
|
|
|
- return TOOLCHAIN_PREFIX + 'ar'
|
|
|
|
|
|
|
+ return TOOLCHAIN_PREFIX + DEFAULT_AR
|
|
|
else:
|
|
else:
|
|
|
- return 'ar'
|
|
|
|
|
|
|
+ return DEFAULT_AR
|
|
|
|
|
|
|
|
def GetRanlib():
|
|
def GetRanlib():
|
|
|
# Hack
|
|
# Hack
|
|
|
if TARGET == 'android':
|
|
if TARGET == 'android':
|
|
|
- return TOOLCHAIN_PREFIX + 'ranlib'
|
|
|
|
|
|
|
+ return TOOLCHAIN_PREFIX + DEFAULT_RANLIB
|
|
|
else:
|
|
else:
|
|
|
- return 'ranlib'
|
|
|
|
|
|
|
+ return DEFAULT_RANLIB
|
|
|
|
|
|
|
|
BISON = None
|
|
BISON = None
|
|
|
def GetBison():
|
|
def GetBison():
|