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
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cctools/ld64/src/ld/OutputFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3805,7 +3805,7 @@ void OutputFile::writeOutputFile(ld::Internal& state)
// <rdar://problem/12264302> Don't use mmap on non-hfs volumes
#ifdef __APPLE__ // ld64-port
struct statfs fsInfo;
if ( statfs(_options.outputFilePath(), &fsInfo) != -1 ) {
if ( (_options.architecture() != CPU_TYPE_ARM64) && (statfs(_options.outputFilePath(), &fsInfo) != -1) ) {
if ( (strcmp(fsInfo.f_fstypename, "hfs") == 0) || (strcmp(fsInfo.f_fstypename, "apfs") == 0) ) {
(void)unlink(_options.outputFilePath());
outputIsMappableFile = true;
Expand Down Expand Up @@ -3835,7 +3835,7 @@ void OutputFile::writeOutputFile(ld::Internal& state)
end[1] = '\0';
#ifdef __APPLE__ // ld64-port
struct statfs fsInfo;
if ( statfs(dirPath, &fsInfo) != -1 ) {
if ( (_options.architecture() != CPU_TYPE_ARM64) && (statfs(dirPath, &fsInfo) != -1) ) {
if ( (strcmp(fsInfo.f_fstypename, "hfs") == 0) || (strcmp(fsInfo.f_fstypename, "apfs") == 0) ) {
outputIsMappableFile = true;
}
Expand Down