Skip to content

Commit

Permalink
Additional fix for CXX containing flags
Browse files Browse the repository at this point in the history
  • Loading branch information
gvoskuilen committed May 23, 2024
1 parent 49b3842 commit 586e5e6
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions bin/sstcclib.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,18 +311,28 @@ def run(typ, extraLibs=""):

ctx = Context()

for entry in sstCppFlags:
clean = cleanFlag(entry)
if clean: #don't add empty flags
ctx.cppFlags.append(clean)

ctx.sstCore = sstCore
ctx.cc = spackcc if spackcc else cc
ctx.cxx = spackcxx if spackcxx else cxx
ctx.typ = typ
ctx.sstCore = sstCore
ctx.hasClang = bool(clangCppFlagsStr)

# Workaround for CXX containing flags
if len(ctx.cxx.split()) > 1:
cxxFlags = ctx.cxx.split()[1:]
ctx.cxx = ctx.cxx.split()[0]

for entry in cxxFlags:
clean = cleanFlag(entry)
if clean: #don't add empty flags
ctx.cppFlags.append(clean)

for entry in sstCppFlags:
clean = cleanFlag(entry)
if clean: #don't add empty flags
ctx.cppFlags.append(clean)


#it is possible to override the host compilers use to do preprocessing/compilation
if args.host_cxx:
Expand Down

0 comments on commit 586e5e6

Please sign in to comment.