Skip to content

Commit

Permalink
Target C++17
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashton Meuser authored and Ashton Meuser committed Jun 1, 2024
1 parent 3ce84a1 commit adea800
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 4 additions & 4 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ elif env["wasm_runtime"] == "wasmtime":

# Check platform specifics
if env["platform"] in ["osx", "macos"]:
env.Prepend(CFLAGS=["-std=gnu11"])
env.Prepend(CXXFLAGS=["-std=gnu++17"])
env.Prepend(CFLAGS=["-std=c11"])
env.Prepend(CXXFLAGS=["-std=c++17"])
env.Append(CCFLAGS=["-arch", "x86_64", "-Wall", "-g", "-O3"])
env.Append(LINKFLAGS=["-arch", "x86_64", "-framework", "Security", "-framework", "CoreFoundation", "-framework", "SystemConfiguration"])
elif env["platform"] == "linux":
env.Prepend(CFLAGS=["-std=gnu11"])
env.Prepend(CXXFLAGS=["-std=gnu++17"])
env.Prepend(CFLAGS=["-std=c11"])
env.Prepend(CXXFLAGS=["-std=c++17"])
env.Append(CCFLAGS=["-fPIC", "-g", "-O3"])
elif env["platform"] == "windows":
env.Prepend(CCFLAGS=["/std:c++17", "-W3", "-GR", "-O2", "-EHsc"])
Expand Down
3 changes: 3 additions & 0 deletions SCsub
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@ elif module_env["wasm_runtime"] == "wasmtime":

# Check platform specifics
if env["platform"] in ["linux", "linuxbsd", "x11"]:
env.Prepend(CXXFLAGS=["-std=c++17"])
env["LIBRUNTIMESUFFIX"] = ".a"
elif env["platform"] in ["osx", "macos"]:
env.Prepend(CXXFLAGS=["-std=c++17"])
env["LIBRUNTIMESUFFIX"] = ".a"
env.Append(LINKFLAGS=["-framework", "Security", "-framework", "CoreFoundation", "-framework", "SystemConfiguration"])
elif env["platform"] == "windows":
env.Prepend(CCFLAGS=["/std:c++17"])
if env.get("use_mingw"): # MinGW
env["LIBRUNTIMESUFFIX"] = ".a"
env.Append(LIBS=["userenv"])
Expand Down

0 comments on commit adea800

Please sign in to comment.