add optional target specification to CpuFeatures#390
add optional target specification to CpuFeatures#390pchickey merged 1 commit intobytecodealliance:masterfrom
Conversation
|
...it doesn't actually add the |
|
Thanks! This is a good start, and having the target distinct from Shared libraries are currently created using the |
It looks like there's support for overriding what linker + flags to use already via environment variables: Lines 379 to 384 in 4b59161 so users who want to cross compile can just set the appropriate environment variables. It's not very nice, but it would work in the short term. An alternative approach is select things based on the dynamically-determined target, not the statically-determined build platform. That's probably the right thing to do in the long term. This might wind up selecting more canonical names ( As far as the tools themselves, Apple open-sources their binutils equivalents ( |
|
If a target is given, maybe we should ignore the defaults for the linker name and arguments, and print a message explaining that they have to be defined. Otherwise, we may get a bunch of "it doesn't work!" support tickets from people setting the target without overriding the linker opts. |
After thinking about it a little more, I think a better design is to have |
334881c to
4225f74
Compare
|
New version up (not sure what the conventions are here about pushing new patches vs. force pushing); I did not require that providing |
Currently, `lucetc` assumes that the machine that it's compiling
for (the "target") is the same as the machine on which `lucetc` is
running ("the host"). While this is a reasonable assumption to make,
many future uses of `lucetc` may require these machines to be distinct.
Towards that end, let's introduce a `--target` option for specifying the
machine `lucetc` is supposed to be generating code for, and thread that
information through to all the places that require it.
4225f74 to
b60dc3c
Compare
|
Review ping; patch updated. |
This change (or something like it) is a prerequisite to being able to
pass
--target [TARGET]to lucetc for cross-compilation purposes.