Skip to content
This repository has been archived by the owner on May 4, 2022. It is now read-only.

Commit

Permalink
wscript: workaround bug when CC_VERSION is not set for msvc
Browse files Browse the repository at this point in the history
  • Loading branch information
a1batross committed Nov 7, 2019
1 parent d3ad80a commit 76c2f90
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions wscript
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ def configure(conf):
conf.load('msvc msdev')
conf.load('xcompile compiler_c compiler_cxx strip_on_install')

try:
conf.env.CC_VERSION[0]
except IndexError:
conf.env.CC_VERSION = (0, )

if conf.env.DEST_OS == 'android':
conf.options.GOLDSRC = False
conf.env.SERVER_NAME = 'server' # can't be any other name, until specified
Expand Down Expand Up @@ -192,8 +197,8 @@ def configure(conf):
'-Werror=declaration-after-statement'
]

linkflags = conf.get_flags_by_type(linker_flags, conf.options.BUILD_TYPE, conf.env.COMPILER_CC)
cflags = conf.get_flags_by_type(compiler_c_cxx_flags, conf.options.BUILD_TYPE, conf.env.COMPILER_CC)
linkflags = conf.get_flags_by_type(linker_flags, conf.options.BUILD_TYPE, conf.env.COMPILER_CC, conf.env.CC_VERSION[0])
cflags = conf.get_flags_by_type(compiler_c_cxx_flags, conf.options.BUILD_TYPE, conf.env.COMPILER_CC, conf.env.CC_VERSION[0])

# Here we don't differentiate C or C++ flags
if conf.options.LTO:
Expand Down

0 comments on commit 76c2f90

Please sign in to comment.