fixes #26060; genscript generated broken script for {.compile.} - #26077
Open
ringabout wants to merge 2 commits into
Open
fixes #26060; genscript generated broken script for {.compile.}#26077ringabout wants to merge 2 commits into
ringabout wants to merge 2 commits into
Conversation
arnetheduck
reviewed
Aug 4, 2026
|
|
||
| let cf = if noAbsolutePaths(conf): AbsoluteFile extractFilename(cfile.cname.string) | ||
| else: cfile.cname | ||
| # Generated files live in nimcache, but external files are not copied there. |
Contributor
There was a problem hiding this comment.
this still doesn't make sense - the "current" directory, when executing a json script, is whatever the current directory was at the time .. we don't change to the nimcache folder before running the compiler so the relative paths will be off in the "json build instructions file"
Member
Author
There was a problem hiding this comment.
Okay, I will use absolute paths for c files in nimcache
Member
Author
There was a problem hiding this comment.
I changed it to absolute paths, thought it would hurt relocatablility
To cross compile, use for example:
nim c --cpu:i386 --os:linux --compileOnly --genScript myproject.nim
Then move the C code and the compile script `compile_myproject.sh`:cmd: to your
Linux i386 machine and run the script.
see 6260757#diff-b0b97f6f8f8480e70f544088bcbf3acdf9a381c4b677f9e67d47022541913e0c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #26060
uses absolute path for
CfileFlag.External