diff options
| author | ruki <[email protected]> | 2021-09-04 22:15:23 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-09-04 22:15:23 +0800 |
| commit | 718c75717bab367194ee3220cdef3d64f17962d8 (patch) | |
| tree | 1d1489cea378e02750a4f4d046cf1353ef053730 | |
| parent | 51860aa00956dd52121339229a5b71b4fc428a72 (diff) | |
remove static library for pascal
| -rw-r--r-- | tests/projects/pascal/static/src/foo.pas | 18 | ||||
| -rw-r--r-- | tests/projects/pascal/static/src/main.pas | 12 | ||||
| -rw-r--r-- | tests/projects/pascal/static/xmake.lua | 9 | ||||
| -rw-r--r-- | xmake/languages/pascal/xmake.lua | 4 | ||||
| -rw-r--r-- | xmake/modules/core/tools/fpc.lua | 1 | ||||
| -rw-r--r-- | xmake/toolchains/fpc/xmake.lua | 5 |
6 files changed, 3 insertions, 46 deletions
diff --git a/tests/projects/pascal/static/src/foo.pas b/tests/projects/pascal/static/src/foo.pas deleted file mode 100644 index 1fb4d7d6e..000000000 --- a/tests/projects/pascal/static/src/foo.pas +++ /dev/null @@ -1,18 +0,0 @@ -library foo; - -{$mode objfpc}{$H+} - -function fib(n : Int64) : Int64; cdecl; -begin - if n > 1 then - begin - Result := fib(n - 1) + fib(n - 2); - end - else - Result := 1; -end; - -exports - fib; -end. - diff --git a/tests/projects/pascal/static/src/main.pas b/tests/projects/pascal/static/src/main.pas deleted file mode 100644 index ce34e4af9..000000000 --- a/tests/projects/pascal/static/src/main.pas +++ /dev/null @@ -1,12 +0,0 @@ -program hello; - -function fib(n: Int64): Int64; - cdecl; external 'foo'; - -var - Value: Integer; -begin - Value := 5; - WriteLn(fib(Value)); -end. - diff --git a/tests/projects/pascal/static/xmake.lua b/tests/projects/pascal/static/xmake.lua deleted file mode 100644 index 759cf69ad..000000000 --- a/tests/projects/pascal/static/xmake.lua +++ /dev/null @@ -1,9 +0,0 @@ -add_rules("mode.debug", "mode.release") -target("foo") - set_kind("static") - add_files("src/foo.pas") - -target("test") - set_kind("binary") - add_deps("foo") - add_files("src/main.pas") diff --git a/xmake/languages/pascal/xmake.lua b/xmake/languages/pascal/xmake.lua index 68d6b5daf..298b9752f 100644 --- a/xmake/languages/pascal/xmake.lua +++ b/xmake/languages/pascal/xmake.lua @@ -22,8 +22,8 @@ language("pascal") add_rules("pascal") set_sourcekinds {pc = {".pas", ".pp", ".ppu", ".lpr"}} set_sourceflags {pc = "pcflags"} - set_targetkinds {binary = "pcld", static = "pcar", shared = "pcsh"} - set_targetflags {binary = "ldflags", static = "arflags", shared = "shflags"} + set_targetkinds {binary = "pcld", shared = "pcsh"} + set_targetflags {binary = "ldflags", shared = "shflags"} set_langkinds {pascal = "pc"} set_mixingkinds("pc") diff --git a/xmake/modules/core/tools/fpc.lua b/xmake/modules/core/tools/fpc.lua index c22386fbb..98b746c8a 100644 --- a/xmake/modules/core/tools/fpc.lua +++ b/xmake/modules/core/tools/fpc.lua @@ -25,7 +25,6 @@ import("core.project.project") -- init it function init(self) - self:set("pcarflags", "-Xt") if not is_plat("windows", "mingw") then self:add("shared.pcflags", "-Cg") end diff --git a/xmake/toolchains/fpc/xmake.lua b/xmake/toolchains/fpc/xmake.lua index d84a383cc..cb2855625 100644 --- a/xmake/toolchains/fpc/xmake.lua +++ b/xmake/toolchains/fpc/xmake.lua @@ -29,13 +29,10 @@ toolchain("fpc") set_toolset("pc", "$(env PC)", "fpc") set_toolset("pcld", "$(env PC)", "fpc") set_toolset("pcsh", "$(env PC)", "fpc") - set_toolset("pcar", "$(env PC)", "fpc") -- on load on_load(function (toolchain) toolchain:set("pcshflags", "") toolchain:set("pcldflags", "") - if toolchain:is_plat("linux") then - toolchain:add("pcldflags", "-k-lc") - end + toolchain:add("syslinks", "c") end) |
