Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support lib path for add_links #3889 #3901

Merged
merged 1 commit into from
Jun 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion xmake/modules/core/tools/gcc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,11 @@ end

-- make the link flag
function nf_link(self, lib)
return "-l" .. lib
if lib:endswith(".a") or lib:endswith(".so") or lib:endswith(".dylib") or lib:endswith(".lib") then
return lib
else
return "-l" .. lib
end
end

-- make the syslink flag
Expand Down
5 changes: 4 additions & 1 deletion xmake/modules/core/tools/link.lua
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ end

-- make the link flag
function nf_link(self, lib)
return lib .. ".lib"
if not lib:endswith(".lib") then
lib = lib .. ".lib"
end
return lib
end

-- make the syslink flag
Expand Down
6 changes: 5 additions & 1 deletion xmake/modules/core/tools/nvcc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,11 @@ end

-- make the link flag
function nf_link(self, lib)
return "-l" .. lib
if lib:endswith(".a") or lib:endswith(".so") or lib:endswith(".dylib") or lib:endswith(".lib") then
return lib
else
return "-l" .. lib
end
end

-- make the syslink flag
Expand Down