diff options
| author | ruki <[email protected]> | 2023-01-26 23:09:48 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-01-26 23:09:48 +0800 |
| commit | 3a0c3e07ba9a7e4cd0f2e1c4f3d13be4f9c92ea8 (patch) | |
| tree | a53fc00c9ad11b44a0bdea0858fc18f0da342015 | |
| parent | 197cfd153cd5b03360ba2d0c9515690cd038b0a7 (diff) | |
improve link for gcc
| -rw-r--r-- | xmake/modules/core/tools/gcc.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index a6fc6fb45..b785b55dc 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -388,13 +388,17 @@ end -- link the target file -- --- we need use os.vrunv() to show link output when enable verbose information +-- maybe we need use os.vrunv() to show link output when enable verbose information -- @see https://github.com/xmake-io/xmake/discussions/2916 -- function link(self, objectfiles, targetkind, targetfile, flags) os.mkdir(path.directory(targetfile)) local program, argv = linkargv(self, objectfiles, targetkind, targetfile, flags) - os.vrunv(program, argv, {envs = self:runenvs()}) + if option.get("verbose") then + os.execv(program, argv, {envs = self:runenvs()}) + else + os.vrunv(program, argv, {envs = self:runenvs()}) + end end -- has color diagnostics? |
