diff options
| author | ruki <[email protected]> | 2018-07-06 22:53:41 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-07-06 11:22:06 +0800 |
| commit | abf9cfcf0905b6110fe57930e3a2e756427eff8f (patch) | |
| tree | 3b3eb5601bdb7b877ae6aacd0ce5e6ed2f3bfbca /xmake/modules/core/tools/gcc.lua | |
| parent | ae821292c473db2f13106e7e3e86be57950a1cfd (diff) | |
remove -fPIC for windows platform
Diffstat (limited to 'xmake/modules/core/tools/gcc.lua')
| -rw-r--r-- | xmake/modules/core/tools/gcc.lua | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index a5d8ce3bc..dbe25a5c2 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -41,11 +41,17 @@ function init(self) , "-DIBAction=void)__attribute__((ibaction)"} -- init shflags - _g.shflags = { "-shared", "-fPIC" } + _g.shflags = { "-shared"} -- init cxflags for the kind: shared - _g.shared = {} - _g.shared.cxflags = {"-fPIC"} + _g.shared = {} + _g.shared.cxflags = {} + + -- add -fPIC + if not is_plat("windows", "mingw") then + table.insert(_g.shflags, "-fPIC") + table.insert(_g.shared.cxflags, "-fPIC") + end -- init flags map _g.mapflags = |
