Comments (3)
Thanks for the report. We should certainly fix this (either by disallowing explicit -Wl,--stack-first
or honoring it).
The reason that folks generally prefer --stack-first
, and the reason emscripten uses it in debug builds, is that you get better stack overflow reporting. i.e. stack overflows will trap right away.
from emscripten.
The problem is that emscripten itself wants to control the --stack-first
linker flag.
See
Lines 882 to 888 in 0e5b3a8
And:
Lines 245 to 246 in 0e5b3a8
The idea is that we use stack-first in debug builds, but not in optimizing builds. Is there some reason you want the stack to be first, even in optimized builds?
from emscripten.
Thank you for letting me know. What you say is sensible. In case you are curious, the reason why I am attempting that is because I am trying to build GHC using the upstream emsdk (rather than using the wasm-sdk fork). The instructions use both flags: https://gitlab.haskell.org/ghc/ghc-wasm-meta#set-environment-variables
I don't know why they use "--stack-first" in all honesty, it might not be necessary as you say. This issue does not affect me as I can get around it. I was just reporting what I encountered. Feel free to close.
from emscripten.
Related Issues (20)
- No transitive dependency with emscripten ports HOT 6
- Template Instantiation Error in system/lib/libcxx/include/__memory/pointer_traits.h HOT 1
- File-related syscalls, like readdir, can not handle empty directories properly HOT 2
- C++ exceptions caught in JavaScript leak stack memory even when documented instructions are followed HOT 4
- WASM_WORKERS=2 documentation HOT 14
- typedef redefinition with different types HOT 6
- [embind] Using `EMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0` fails with polymorphic types HOT 4
- It could help to always use JS for memsets during startup / that are always large HOT 6
- Weird --embind-emit-tsd output HOT 1
- how to generated only one file *.js if i use pthread HOT 2
- [embind] Automatic downcasting doesn't work for address over 2gb
- scorecards action seems broken. HOT 3
- --embind-emit-tsd may cause "ReferenceError: assert is not defined"
- embind d.ts defintion for std::string
- Any example to compile a project via emscripten and use it in wasmtime? HOT 10
- In `-sMODULARIZE` mode the `moduleArg` should not be modified in place
- Bind error of getting a pointer property in class
- Make mimalloc headers accessible HOT 2
- lto2.test_embind_i64_val is failing
- evaluation of std::sin in C++ is slower than in JS directly HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emscripten.