From cff5115b2b5c3bb7210299b717a2cd88777b7b6f Mon Sep 17 00:00:00 2001 From: Ashton Meuser Date: Sat, 1 Jun 2024 09:13:12 -0700 Subject: [PATCH] Target C++14 --- SConstruct | 6 +++--- SCsub | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/SConstruct b/SConstruct index f6c7183..2da7c00 100644 --- a/SConstruct +++ b/SConstruct @@ -33,15 +33,15 @@ elif env["wasm_runtime"] == "wasmtime": # Check platform specifics if env["platform"] in ["osx", "macos"]: env.Prepend(CFLAGS=["-std=c11"]) - env.Prepend(CXXFLAGS=["-std=c++17"]) + env.Prepend(CXXFLAGS=["-std=c++14"]) 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=c11"]) - env.Prepend(CXXFLAGS=["-std=c++17"]) + env.Prepend(CXXFLAGS=["-std=c++14"]) env.Append(CCFLAGS=["-fPIC", "-g", "-O3"]) elif env["platform"] == "windows": - env.Prepend(CCFLAGS=["/std:c++17", "-W3", "-GR", "-O2", "-EHsc"]) + env.Prepend(CCFLAGS=["/std:c++14", "-W3", "-GR", "-O2", "-EHsc"]) env.Append(ENV=os.environ) # Keep session env variables to support VS 2017 prompt env.Append(CPPDEFINES=["WIN32", "_WIN32", "_WINDOWS", "_CRT_SECURE_NO_WARNINGS", "NDEBUG"]) if env.get("use_mingw"): # MinGW diff --git a/SCsub b/SCsub index 89fbba4..df06b8a 100644 --- a/SCsub +++ b/SCsub @@ -19,14 +19,11 @@ 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"])