diff options
author | 2015-12-03 13:33:40 +0100 | |
---|---|---|
committer | 2015-12-03 13:33:40 +0100 | |
commit | 871428ef9e9aba332bd33d9949fe62fc05b27ca4 (patch) | |
tree | 2088d7e799b85ab50866520458d0067e01d590bc /scripts/genie.lua | |
parent | bb6ca65238c705b43e86d8e817fea2339c7edef6 (diff) |
Set -std=c++1y to clang 3.4 (nw)
Diffstat (limited to 'scripts/genie.lua')
-rw-r--r-- | scripts/genie.lua | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/scripts/genie.lua b/scripts/genie.lua index 18ddea353ee..b16a5d97d53 100644 --- a/scripts/genie.lua +++ b/scripts/genie.lua @@ -723,7 +723,18 @@ else } end +local version = str_to_version(_OPTIONS["gcc_version"]) +if string.find(_OPTIONS["gcc"], "clang") and (version < 30500) then + buildoptions_cpp { + "-x c++", + "-std=c++1y", + } + buildoptions_objc { + "-x objective-c++", + "-std=c++1y", + } +else buildoptions_cpp { "-x c++", "-std=c++14", @@ -733,8 +744,7 @@ end "-x objective-c++", "-std=c++14", } - - +end -- this speeds it up a bit by piping between the preprocessor/compiler/assembler if not ("pnacl" == _OPTIONS["gcc"]) then buildoptions { @@ -956,7 +966,7 @@ end local version = str_to_version(_OPTIONS["gcc_version"]) if string.find(_OPTIONS["gcc"], "clang") then if (version < 30400) then - print("Clang version 3.4 or later needed") + print("Clang version 3.5 or later needed") os.exit(-1) end buildoptions { |