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

Fix wrong system include when targeting Emscripten. #2205

Closed
wants to merge 1 commit into from
Closed
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: 4 additions & 2 deletions src/tools/gcc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -505,14 +505,16 @@
architecture = {
x86 = function (cfg)
local r = {}
if not table.contains(os.getSystemTags(cfg.system), "darwin") then
if not (table.contains(os.getSystemTags(cfg.system), "darwin")
or table.contains(os.getSystemTags(cfg.system), "emscripten")) then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Core doesn't support Emscripten as a target, and shouldn't contain fixes for it. There are two things the Emscripten module should fix:

  1. It should add appropriate architectures (asmjs and/or wasm32, maybe wasm64 too) instead of hijacking existing architectures. This is likely a lot of work with a lot of testing required, so doing the following would suffice.
  2. It should override the outputs from the clang toolset, the architecture library directories override should be done here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implemented both your suggestions in tritao/premake-emscripten@e693f23 and tritao/premake-emscripten@ab96fbd.

table.insert (r, "-L/usr/lib32")
end
return r
end,
x86_64 = function (cfg)
local r = {}
if not table.contains(os.getSystemTags(cfg.system), "darwin") then
if not (table.contains(os.getSystemTags(cfg.system), "darwin")
or table.contains(os.getSystemTags(cfg.system), "emscripten")) then
table.insert (r, "-L/usr/lib64")
end
return r
Expand Down
Loading