Skip to content

Commit

Permalink
MSC Added support for custom entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
GamesTrap committed Dec 4, 2023
1 parent 8fb0379 commit 795e8a2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ninja.lua
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,10 @@ local function getldflags(toolset, cfg)

local ldflags = ninja.list(table.join(libdirs, toolset.getldflags(cfg), cfg.linkoptions))

if toolset == p.tools.msc and cfg.entrypoint ~= nil then
ldflags = ldflags .. " /ENTRY:" .. cfg.entrypoint
end

-- experimental feature, change install_name of shared libs
--if (toolset == p.tools.clang) and (cfg.kind == p.SHAREDLIB) and ninja.endsWith(cfg.buildtarget.name, ".dylib") then
-- ldflags = ldflags .. " -install_name " .. cfg.buildtarget.name
Expand Down

0 comments on commit 795e8a2

Please sign in to comment.