-
Notifications
You must be signed in to change notification settings - Fork 701
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
Support for asm-sources, cmm-sources, and js-sources in executable components #8639
Comments
I just ran into this :D I'll see what I can slap together during Zurihac. |
JoshMeredith
added a commit
to JoshMeredith/cabal
that referenced
this issue
Jun 23, 2023
4 tasks
JoshMeredith
added a commit
to JoshMeredith/cabal
that referenced
this issue
Jun 30, 2023
ulysses4ever
pushed a commit
to JoshMeredith/cabal
that referenced
this issue
Jul 16, 2023
mergify bot
pushed a commit
that referenced
this issue
Jul 16, 2023
* WIP support asm/cmm/js sources in executable components (#8639) * Factorise extra src code for lib/exe and add extra exe src tests * Add extra sources to linking step * lint * lint * Don't build js sources for executables on non-js hosts * Fix cabal.out for CmmSourcesExe test and lint * Update changelog * Slight changes
mergify bot
pushed a commit
that referenced
this issue
Jul 16, 2023
* WIP support asm/cmm/js sources in executable components (#8639) * Factorise extra src code for lib/exe and add extra exe src tests * Add extra sources to linking step * lint * lint * Don't build js sources for executables on non-js hosts * Fix cabal.out for CmmSourcesExe test and lint * Update changelog * Slight changes (cherry picked from commit 3350a6c) # Conflicts: # Cabal/src/Distribution/Simple/GHC.hs
It's pretty unclear why |
can this be closed now since #9061 was merged? |
Indeed! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Cabal doesn't support
asm-sources
,cmm-sources
, andjs-sources
inexecutable
components.To Reproduce
Expected behavior
Cabal should take into account the specified foreign files: link them when present, or fail when not present as in the reproducer above.
At the very least a warning that the fields are parsed but unused would be a better UX.
System information
Additional context
I've noticed this bug while I was adapting the implementation of
asm-sources
to fix the support forjs-sources
in #8636.As far as I can tell, the issue is in
Distribution.Simple.GHC
module.gbuildSources
only returns C and C++ foreign sources (cf fields ofBuildSources
record). It should also returnCmm
,asm
, andjs
sources. ThenBuildSources
new fields must be handled properly ingbuild
.It looks like the code to build C/C++ sources for a library (in
buildOrReplLib
) is duplicated ingbuild
to build an executable. I was reluctant to copy-paste the code handling asm/cmm/js sources frombuildOrReplLib
togbuild
too. It should probably be factorized instead. That's why I didn't do it as part of #8636.The text was updated successfully, but these errors were encountered: