diff options
| author | ruki <[email protected]> | 2022-08-23 09:36:29 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-08-23 09:36:29 +0800 |
| commit | 006390def621247c8d3857495afaa4e7038a32fa (patch) | |
| tree | aa0bb46561ded824fd53999d0d6884fa803ba942 /xmake/modules/core/tools | |
| parent | 5a9631ba93e7a677a8c1e9769b17e392cdbb61af (diff) | |
| parent | 2019daea91cb6ad5eda1a38fab3b515e261ea698 (diff) | |
Merge pull request #2707 from xmake-io/framework
improve frameworks
Diffstat (limited to 'xmake/modules/core/tools')
| -rw-r--r-- | xmake/modules/core/tools/gcc.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index 4122c8ae8..7dfaab07f 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -350,13 +350,14 @@ function linkargv(self, objectfiles, targetkind, targetfile, flags, opt) -- add rpath for dylib (macho), e.g. -install_name @rpath/file.dylib local flags_extra = {} - if targetkind == "shared" and is_plat("macosx", "iphoneos", "watchos") then + local plat = self:plat() + if targetkind == "shared" and (plat == "macosx" or plat == "iphoneos" or plat == "watchos") then table.insert(flags_extra, "-install_name") table.insert(flags_extra, "@rpath/" .. path.filename(targetfile)) end -- add `-Wl,--out-implib,outputdir/libxxx.a` for xxx.dll on mingw/gcc - if targetkind == "shared" and is_plat("mingw") then + if targetkind == "shared" and plat == "mingw" then table.insert(flags_extra, "-Wl,--out-implib," .. path.join(path.directory(targetfile), path.basename(targetfile) .. ".dll.a")) end |
