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
Compile otherlibs/ C stubs in two version for native and bytecode #11828
Conversation
Many thanks!
This looks very nice to me and I think there is not much need to spend
tim on the details, because all these makefiles are going to vanish
anyway.
Here are a few very minor suggestions:
* Squash the commits (I assume that was your intention)*
* For symmetry, I'd use byt as a prefix for the bytecode verison of the stub library but others may disagree here
* You could use a variable to define the C sources andthen compute your lists of objects fromthere, as is done in the Unix case, that would save some redundency
|
i also prefer symmetry, but I mimicked what is already done for |
061e3a2
to
df7af44
Compare
Done. I also squashed the commits, and fixed a typo that prevented |
Olivier Nicole (2022/12/21 05:52 -0800):
> * For symmetry, I'd use byt as a prefix for the bytecode verison of the stub library but others may disagree here
i also prefer symmetry, but I mimicked what is already done for
`libthreads`. I’m happy to do the symmetric solution if you prefer
though.
I'd tend to do the symmetric one, including htreads. Let's try and
fallback to non-symmetry only if somebody complains. :-)
|
df7af44
to
9474f93
Compare
OK, done. |
Olivier Nicole (2022/12/22 03:52 -0800):
> > * For symmetry, I'd use byt as a prefix for the bytecode verison of the stub library but others may disagree here i also prefer symmetry, but I mimicked what is already done for `libthreads`. I’m happy to do the symmetric solution if you prefer though.
>
> I'd tend to do the symmetric one, including htreads. Let's try and fallback to non-symmetry only if somebody complains. :-)
OK, done.
Thanks. The PR looks as reasonable as permitted by the current state of
our build system so I am going to approve and merge.
|
The build fails at installation time on bytecode-only systems:
|
Sorry for forgetting to check the bytecode-only build. I propose a fix in #11842. |
Currently, the libraries in
otherlibs/
use a set of C files that are compiled and used to generate both a static library ($(CLIBNAME).$(A)
, where$(A)
isa
on Linux) and a dynamic one (dll$(CLIBNAME).$(SO)
).While working on ThreadSanitizer support, we found ourselves needing to use specific compilation flags for the native backend, and therefore to compile
otherlibs
libraries in two different versions, one for bytecode and one for native. This seems to be a natural enough need to propose a PR for it. @dra27 mentioned that he has a Windows-related use case for this, too.