Skip to content

Commit

Permalink
[scons] Use GCC-10 on hosted-darwin targets
Browse files Browse the repository at this point in the history
  • Loading branch information
salkinium committed Jul 5, 2020
1 parent 6c4a8d6 commit 2f125fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@ if(WIN32)
%% if platform == "hosted"
elseif(APPLE)
# Using homebrew gcc on macOS
find_program(GCC_VERSION NAMES "gcc-9" "gcc-8" "gcc-7")
string(LENGTH ${GCC_VERSION} GCC_VERSION_LENGTH)
math(EXPR GCC_VERSION_LENGTH "${GCC_VERSION_LENGTH}-2")
string(SUBSTRING ${GCC_VERSION} ${GCC_VERSION_LENGTH} -1 GCC_VERSION)
find_program(GCC_VERSION NAMES "gcc-10" "gcc-9" "gcc-8" "gcc-7")
string(REGEX MATCH "gcc-[0-9]+" GCC_VERSION ${GCC_VERSION})
string(SUBSTRING ${GCC_VERSION} 3 -1 GCC_VERSION)
set(TOOL_EXECUTABLE_SUFFIX "${GCC_VERSION}")
%% endif
else()
Expand Down
2 changes: 1 addition & 1 deletion tools/build_script_generator/scons/resources/SConscript.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ env["BUILDPATH"] = join(env["CONFIG_BUILD_BASE"], profile)
env["BASEPATH"] = abspath(".")
%% if family == "darwin"
# Using homebrew gcc on macOS instead of clang
env["COMPILERSUFFIX"] = env.Detect(["gcc-9", "gcc-8", "gcc-7"])[3:]
env["COMPILERSUFFIX"] = env.Detect(["gcc-10", "gcc-9", "gcc-8", "gcc-7"])[3:]
%% endif
%% endif

Expand Down

0 comments on commit 2f125fd

Please sign in to comment.