diff options
| author | ruki <[email protected]> | 2017-02-06 21:56:55 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-02-06 21:56:55 +0800 |
| commit | e9aa23db2437faf17ca097e891ec5a1e628865f3 (patch) | |
| tree | 9c6aa8f108f84ba07e5016796a28b7b8401e0ad8 /xmake/tools | |
| parent | 2c125229b2da9e9d854275ae08cd29ecf57a447d (diff) | |
modify linker script
Diffstat (limited to 'xmake/tools')
| -rwxr-xr-x | xmake/tools/cl.lua | 20 | ||||
| -rwxr-xr-x | xmake/tools/clang.lua | 2 | ||||
| -rwxr-xr-x | xmake/tools/gcc.lua | 24 | ||||
| -rwxr-xr-x | xmake/tools/go.lua | 24 | ||||
| -rwxr-xr-x | xmake/tools/link.lua | 10 | ||||
| -rwxr-xr-x | xmake/tools/ml.lua | 16 | ||||
| -rw-r--r-- | xmake/tools/swiftc.lua | 54 |
7 files changed, 75 insertions, 75 deletions
diff --git a/xmake/tools/cl.lua b/xmake/tools/cl.lua index e659fc686..963bf3447 100755 --- a/xmake/tools/cl.lua +++ b/xmake/tools/cl.lua @@ -89,7 +89,7 @@ function get(name) end -- make the symbol flag -function symbol(level, symbolfile) +function nf_symbol(level, target) -- check -FS flags if _g._FS == nil then @@ -108,8 +108,8 @@ function symbol(level, symbolfile) -- debug? generate *.pdb file local flags = "" if level == "debug" then - if symbolfile then - flags = "-ZI -Fd" .. symbolfile + if target and target.symbolfile then + flags = "-ZI -Fd" .. target:symbolfile() if _g._FS then flags = "-FS " .. flags end @@ -123,7 +123,7 @@ function symbol(level, symbolfile) end -- make the warning flag -function warning(level) +function nf_warning(level) -- the maps local maps = @@ -140,7 +140,7 @@ function warning(level) end -- make the optimize flag -function optimize(level) +function nf_optimize(level) -- the maps local maps = @@ -158,7 +158,7 @@ function optimize(level) end -- make the vector extension flag -function vectorext(extension) +function nf_vectorext(extension) -- the maps local maps = @@ -174,7 +174,7 @@ function vectorext(extension) end -- make the language flag -function language(stdname) +function nf_language(stdname) -- the stdc maps local cmaps = @@ -197,21 +197,21 @@ function language(stdname) end -- make the define flag -function define(macro) +function nf_define(macro) -- make it return "-D" .. macro:gsub("\"", "\\\"") end -- make the undefine flag -function undefine(macro) +function nf_undefine(macro) -- make it return "-U" .. macro end -- make the includedir flag -function includedir(dir) +function nf_includedir(dir) -- make it return "-I" .. dir diff --git a/xmake/tools/clang.lua b/xmake/tools/clang.lua index 2f5ac1a72..eb7c4b058 100755 --- a/xmake/tools/clang.lua +++ b/xmake/tools/clang.lua @@ -46,7 +46,7 @@ function init(shellname, kind) end -- make the strip flag -function strip(level) +function nf_strip(level) -- the maps local maps = diff --git a/xmake/tools/gcc.lua b/xmake/tools/gcc.lua index 5e2fc3712..47832580f 100755 --- a/xmake/tools/gcc.lua +++ b/xmake/tools/gcc.lua @@ -75,7 +75,7 @@ function get(name) end -- make the strip flag -function strip(level) +function nf_strip(level) -- the maps local maps = @@ -89,7 +89,7 @@ function strip(level) end -- make the symbol flag -function symbol(level) +function nf_symbol(level) -- the maps local maps = @@ -103,7 +103,7 @@ function symbol(level) end -- make the warning flag -function warning(level) +function nf_warning(level) -- the maps local maps = @@ -120,7 +120,7 @@ function warning(level) end -- make the optimize flag -function optimize(level) +function nf_optimize(level) -- the maps local maps = @@ -138,7 +138,7 @@ function optimize(level) end -- make the vector extension flag -function vectorext(extension) +function nf_vectorext(extension) -- the maps local maps = @@ -158,7 +158,7 @@ function vectorext(extension) end -- make the language flag -function language(stdname) +function nf_language(stdname) -- the stdc maps local cmaps = @@ -197,35 +197,35 @@ function language(stdname) end -- make the define flag -function define(macro) +function nf_define(macro) -- make it return "-D" .. macro:gsub("\"", "\\\"") end -- make the undefine flag -function undefine(macro) +function nf_undefine(macro) -- make it return "-U" .. macro end -- make the includedir flag -function includedir(dir) +function nf_includedir(dir) -- make it return "-I" .. dir end --- make the linklib flag -function linklib(lib) +-- make the link flag +function nf_link(lib) -- make it return "-l" .. lib end -- make the linkdir flag -function linkdir(dir) +function nf_linkdir(dir) -- make it return "-L" .. dir diff --git a/xmake/tools/go.lua b/xmake/tools/go.lua index 67450cf53..cb14e931b 100755 --- a/xmake/tools/go.lua +++ b/xmake/tools/go.lua @@ -47,57 +47,57 @@ function get(name) end -- make the strip flag -function strip(level) +function nf_strip(level) return "" end -- make the symbol flag -function symbol(level) +function nf_symbol(level) return "" end -- make the warning flag -function warning(level) +function nf_warning(level) return "" end -- make the optimize flag -function optimize(level) +function nf_optimize(level) return "" end -- make the vector extension flag -function vectorext(extension) +function nf_vectorext(extension) return "" end -- make the language flag -function language(stdname) +function nf_language(stdname) return "" end -- make the define flag -function define(macro) +function nf_define(macro) return "" end -- make the undefine flag -function undefine(macro) +function nf_undefine(macro) return "" end -- make the includedir flag -function includedir(dir) +function nf_includedir(dir) return "" end --- make the linklib flag -function linklib(lib) +-- make the link flag +function nf_link(lib) return "" end -- make the linkdir flag -function linkdir(dir) +function nf_linkdir(dir) return "" end diff --git a/xmake/tools/link.lua b/xmake/tools/link.lua index caea45029..c7e9096bf 100755 --- a/xmake/tools/link.lua +++ b/xmake/tools/link.lua @@ -72,12 +72,12 @@ function get(name) end -- make the strip flag -function strip(level) +function nf_strip(level) return "" end -- make the symbol flag -function symbol(level, target) +function nf_symbol(level, target) -- debug? generate *.pdb file local flags = "" @@ -93,15 +93,15 @@ function symbol(level, target) return flags end --- make the linklib flag -function linklib(lib) +-- make the link flag +function nf_link(lib) -- make it return lib .. ".lib" end -- make the linkdir flag -function linkdir(dir) +function nf_linkdir(dir) -- make it return "-libpath:" .. dir diff --git a/xmake/tools/ml.lua b/xmake/tools/ml.lua index 0eef34d4e..f32b5b361 100755 --- a/xmake/tools/ml.lua +++ b/xmake/tools/ml.lua @@ -65,12 +65,12 @@ function get(name) end -- make the symbol flag -function symbol(level, symbolfile) +function nf_symbol(level) return "" end -- make the warning flag -function warning(level) +function nf_warning(level) -- the maps local maps = @@ -87,36 +87,36 @@ function warning(level) end -- make the optimize flag -function optimize(level) +function nf_optimize(level) return "" end -- make the vector extension flag -function vectorext(extension) +function nf_vectorext(extension) return "" end -- make the language flag -function language(stdname) +function nf_language(stdname) return "" end -- make the define flag -function define(macro) +function nf_define(macro) -- make it return "-D" .. macro:gsub("\"", "\\\"") end -- make the undefine flag -function undefine(macro) +function nf_undefine(macro) -- make it return "-U" .. macro end -- make the includedir flag -function includedir(dir) +function nf_includedir(dir) -- make it return "-I" .. dir diff --git a/xmake/tools/swiftc.lua b/xmake/tools/swiftc.lua index d3808e261..4fdca0f18 100644 --- a/xmake/tools/swiftc.lua +++ b/xmake/tools/swiftc.lua @@ -77,12 +77,12 @@ function get(name) end -- make the symbol flag -function symbol(level, symbolfile) +function nf_symbol(level) -- the maps local maps = { - debug = "-g" + debug = "-g" } -- make it @@ -90,7 +90,7 @@ function symbol(level, symbolfile) end -- make the warning flag -function warning(level) +function nf_warning(level) -- the maps local maps = @@ -107,7 +107,7 @@ function warning(level) end -- make the optimize flag -function optimize(level) +function nf_optimize(level) -- the maps local maps = @@ -125,7 +125,7 @@ function optimize(level) end -- make the vector extension flag -function vectorext(extension) +function nf_vectorext(extension) -- the maps local maps = @@ -145,10 +145,31 @@ function vectorext(extension) end -- make the language flag -function language(stdname) +function nf_language(stdname) return "" end +-- make the includedir flag +function nf_includedir(dir) + + -- make it + return "-Xcc -I" .. dir +end + +-- make the define flag +function nf_define(macro) + + -- make it + return "-Xcc -D" .. macro:gsub("\"", "\\\"") +end + +-- make the undefine flag +function nf_undefine(macro) + + -- make it + return "-Xcc -U" .. macro +end + -- make the compile command function compcmd(sourcefile, objectfile, flags) @@ -178,27 +199,6 @@ function compile(sourcefile, objectfile, incdepfile, flags) os.run(compcmd(sourcefile, objectfile, flags)) end --- make the includedir flag -function includedir(dir) - - -- make it - return "-Xcc -I" .. dir -end - --- make the define flag -function define(macro) - - -- make it - return "-Xcc -D" .. macro:gsub("\"", "\\\"") -end - --- make the undefine flag -function undefine(macro) - - -- make it - return "-Xcc -U" .. macro -end - -- check the given flags function check(flags) |
