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

[CMake] Detect properly new linker introduced in Xcode 15 #7962

Closed

Conversation

edymtt
Copy link

@edymtt edymtt commented Jan 11, 2024

This linker is functionally equivalent to the classic one (ld64) for build system purposes -- in particular to enable the use of order files to link clang.
For this reason, in addition to fixing the detection rename LLVM_LINKER_IS_LD64 to LLVM_LINKER_IS_APPLE to make the result of such detection more clear -- this should not cause any issue to downstream users, from a quick serch in
Sourcegraph only Swift uses the value of this variable (which I will take care of updating in due time).

rdar://120740222
(cherry picked from commit 7a7f803)

[This linker](https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#Linking)
is functionally equivalent to the classic one (`ld64`) for build system
purposes -- in particular to enable the use of order files to link
`clang`.
For this reason, in addition to fixing the detection rename
`LLVM_LINKER_IS_LD64` to `LLVM_LINKER_IS_APPLE` to make the result of
such detection more clear -- this should not cause any issue to
downstream users, from a quick serch in
[Sourcegraph](https://sourcegraph.com/search?q=context:global+LLVM_LINKER_IS_LD64+lang:cmake+fork:no+-file:AddLLVM.cmake+-file:clang/tools/driver/CMakeLists.txt&patternType=standard&sm=1&groupBy=repo)
only Swift uses the value of this variable (which I will take care of
updating in due time).

rdar://120740222
(cherry picked from commit 7a7f803)
@edymtt
Copy link
Author

edymtt commented Jan 11, 2024

@swift-ci test llvm

@edymtt
Copy link
Author

edymtt commented Jan 15, 2024

For macOS, getting almost the same failures as https://ci.swift.org/job/pr-apple-llvm-project-llvm-macos/172 (4 instead of 5), so that should confirm these are independent of this change

Failed Tests (4):
  Clang :: CodeGen/attr-counted-by.c
  Clang :: CodeGen/ptrauth-in-c-struct.c
  Clang :: CodeGenCXX/ptrauth-member-function-pointer.cpp
  Clang :: CodeGenObjCXX/ptrauth-property-object-reference.mm

@edymtt
Copy link
Author

edymtt commented Jan 15, 2024

@swift-ci test llvm

@edymtt edymtt force-pushed the edymtt/detect-linker-xcode-15-apple-fork branch from 4140ff0 to 679f164 Compare January 16, 2024 16:31
@edymtt
Copy link
Author

edymtt commented Jan 16, 2024

The fix worked, breaking that out in a separate PR, #7977

@edymtt
Copy link
Author

edymtt commented Jan 16, 2024

@swift-ci test llvm

@edymtt
Copy link
Author

edymtt commented Jan 19, 2024

The upstream PR has been merged, so this is no longer needed.

@edymtt edymtt closed this Jan 19, 2024
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.

None yet

1 participant