Fix codelite module test failure
- Align clang cflags and cxxflags with gcc
This commit is contained in:
parent
0360b83669
commit
8d9fee6941
@ -196,7 +196,7 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
local toolset = m.getcompiler(cfg)
|
local toolset = m.getcompiler(cfg)
|
||||||
local cxxflags = table.concat(table.join(toolset.getcflags(cfg), toolset.getcxxflags(cfg), cfg.buildoptions), ";")
|
local cxxflags = table.concat(table.join(toolset.getcxxflags(cfg), cfg.buildoptions), ";")
|
||||||
local cflags = table.concat(table.join(toolset.getcflags(cfg), cfg.buildoptions), ";")
|
local cflags = table.concat(table.join(toolset.getcflags(cfg), cfg.buildoptions), ";")
|
||||||
local asmflags = ""
|
local asmflags = ""
|
||||||
local pch = ""
|
local pch = ""
|
||||||
|
@ -41,11 +41,11 @@
|
|||||||
-- An array of C compiler flags.
|
-- An array of C compiler flags.
|
||||||
--
|
--
|
||||||
|
|
||||||
clang.cflags = {
|
clang.shared = {
|
||||||
architecture = gcc.cflags.architecture,
|
architecture = gcc.shared.architecture,
|
||||||
flags = gcc.cflags.flags,
|
flags = gcc.shared.flags,
|
||||||
floatingpoint = gcc.cflags.floatingpoint,
|
floatingpoint = gcc.shared.floatingpoint,
|
||||||
strictaliasing = gcc.cflags.strictaliasing,
|
strictaliasing = gcc.shared.strictaliasing,
|
||||||
optimize = {
|
optimize = {
|
||||||
Off = "-O0",
|
Off = "-O0",
|
||||||
On = "-O2",
|
On = "-O2",
|
||||||
@ -54,18 +54,21 @@
|
|||||||
Size = "-Os",
|
Size = "-Os",
|
||||||
Speed = "-O3",
|
Speed = "-O3",
|
||||||
},
|
},
|
||||||
pic = gcc.cflags.pic,
|
pic = gcc.shared.pic,
|
||||||
vectorextensions = gcc.cflags.vectorextensions,
|
vectorextensions = gcc.shared.vectorextensions,
|
||||||
warnings = gcc.cflags.warnings,
|
warnings = gcc.shared.warnings,
|
||||||
symbols = gcc.cflags.symbols
|
symbols = gcc.shared.symbols
|
||||||
}
|
}
|
||||||
|
|
||||||
function clang.getcflags(cfg)
|
function clang.getcflags(cfg)
|
||||||
|
local shared_flags = config.mapFlags(cfg, clang.shared)
|
||||||
|
|
||||||
local flags = config.mapFlags(cfg, clang.cflags)
|
-- Just pass through to GCC for now
|
||||||
|
local cflags = config.mapFlags(cfg, gcc.cflags)
|
||||||
|
|
||||||
|
local flags = table.join(shared_flags, cflags)
|
||||||
flags = table.join(flags, clang.getwarnings(cfg))
|
flags = table.join(flags, clang.getwarnings(cfg))
|
||||||
return flags
|
return flags
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function clang.getwarnings(cfg)
|
function clang.getwarnings(cfg)
|
||||||
@ -88,11 +91,14 @@
|
|||||||
--
|
--
|
||||||
|
|
||||||
function clang.getcxxflags(cfg)
|
function clang.getcxxflags(cfg)
|
||||||
|
local shared_flags = config.mapFlags(cfg, clang.shared)
|
||||||
|
|
||||||
-- Just pass through to GCC for now
|
-- Just pass through to GCC for now
|
||||||
local flags = gcc.getcxxflags(cfg)
|
local cxxflags = config.mapFlags(cfg, gcc.cxxflags)
|
||||||
return flags
|
|
||||||
|
|
||||||
|
local flags = table.join(shared_flags, cxxflags)
|
||||||
|
flags = table.join(flags, clang.getwarnings(cfg))
|
||||||
|
return flags
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user