-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
The links function blindly appends .lib to the dependencies when the action is one of the vs* values. Unfortunately this collides with the desire to sometimes link to object files provided directly by Microsoft. Examples are thrownew.obj (and nothrownew.obj), hotpatch.obj, pnoarg.obj and setargv.obj (setargv.obj etc). The latter is useful to link POSIX utilities which expect the command line arguments to already be expanded, whereas on Windows the application itself is usually expected to handle wild cards.
As a side-note, my fix to the issue is this one (pure Lua):
-- Fix up premake.getlinks() to not do stupid stuff with object files we pass
local orig_premake_getlinks = premake.getlinks
premake.getlinks = function(cfg, kind, part)
local origret = orig_premake_getlinks(cfg, kind, part)
local ret = {}
for k,v in ipairs(origret) do
local dep = v:gsub(".obj.lib", ".obj")
dep = dep:gsub(".lib.lib", ".lib")
table.insert(ret, dep)
end
return ret
end
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels