Skip to content
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

Turn off outputIsMappableFile when building to osx-arm64 #118

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

erykoff
Copy link
Contributor

@erykoff erykoff commented Feb 25, 2022

This fixes #117.

Further investigation shows that with the newest version of cctools-port + sigtool for signing then whenever the outputIsMappableFile=true which triggers wholeBuffer = (uint8_t *)mmap(NULL, _fileSize, PROT_WRITE|PROT_READ, MAP_SHARED, fd, 0); then the output binary will not work on M1 macs. This can be triggered when either (a) the file already exists, or (b) the path is explicitly specified (relative or absolute). I'm not sure why the mmap option is necessary, and everything appears to run fine turning it off (and it is off in regular usage when you target a new file without a path specified!).

@tpoechtrager
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using compilers with -o absolute-path/to/target is broken for recent cctools
2 participants