diff --git a/SConstruct b/SConstruct index b6928e8..f6c7183 100644 --- a/SConstruct +++ b/SConstruct @@ -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"]) diff --git a/SCsub b/SCsub index df06b8a..89fbba4 100644 --- a/SCsub +++ b/SCsub @@ -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"])