-
Notifications
You must be signed in to change notification settings - Fork 248
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
Add some sort of "wrapper" argument #668
Comments
I think the solution here is to register a `` toolchain using We use that here: If you build with this toolchain, then the environment variable |
Oh that's cool! I'll give that a try, thanks. To be fair, I used to do that (register my own toolchain), but I did it somewhat differently: I registered a wasm-only toolchain, but I registered it only for At some point recently I abandoned that approach as it seemed it was no longer necessary, and instead I modified the args to the existing toolchains using |
OK I remember now. The trouble with the custom toolchain was that it needs multiple tools, including the original toolthain tool. This is because the command that I need to run ends up being And back then I couldn't figure out how to properly aggregate all those tools in one rule so that I can pass them to as |
I looked at what those wrappers do ( Let's not add any more extra args then, there are many already. And thanks for helping with this case! |
Short version: it would be convenient to have a "wrapper" tool that gets executed as a prefix before
cmake
,make
and…/configure
. This is specifically to target the existing wrappers for Emscripten:emcmake
,emmake
andemconfigure
.Version 0.3.0 removes the
make_commands
argument frommake()
. This is great, as passingtargets
andargs
is much more flexible, and in general works better, however, I was (ab)usingmake_commands
to pass my own wrapper, and thus callemmake make
andemmake make install
directly.The same would be very useful for
configure_make()
. Currently I use a workaround where I patch in anemconfigure.sh
into the source archives, which constructs the right command (emconfigure configure …
) based on environment variables that I need to pass in at build time.For CMake, there is no easy way to pass in such a wrapper, but the Emscripten CMake wrapper actually does very little other than passing in some cache entries like
CMAKE_TOOLCHAIN_FILE
, which setsCMAKE_MODULE_PATH
,CMAKE_CROSS_COMPILING_EMULATOR
, etc.I've been trying to resist adding such a wrapper arg myself as I was instead trying to get all the right flags from Bazel, to get the regular
./configure
andmake
produce awasm32
build based on the CC toolchain flags alone. But it's getting harder to do that, and with the removal ofmake_commands
frommake()
(which, btw, is still there inconfigure_make
) it is quite a challenge now to pass in the right incantations tomake()
to get it to cross-compile properly.The text was updated successfully, but these errors were encountered: