Skip to content

[flang] Make .exe extension of the linker optional (NFC) #73157

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

Merged
merged 1 commit into from
Nov 23, 2023

Conversation

kkwli
Copy link
Collaborator

@kkwli kkwli commented Nov 22, 2023

The change in 34e4e5eb70818 breaks our local build that uses -DCLANG_DEFAULT_LINKER=lld. Although there is an open issue (#73153) related to CLANG_DEFAULT_LINKER and FLANG_DEFAULT_LINKER, the name of the linker may not have the .exe extension.

@kkwli kkwli requested a review from tarunprabhu November 22, 2023 18:21
@llvmbot llvmbot added flang:driver flang Flang issues not falling into any other category labels Nov 22, 2023
@llvmbot
Copy link
Member

llvmbot commented Nov 22, 2023

@llvm/pr-subscribers-flang-driver

Author: None (kkwli)

Changes

The change in 34e4e5eb70818 breaks our local build that uses -DCLANG_DEFAULT_LINKER=lld. Although there is an open issue (#73153) related to CLANG_DEFAULT_LINKER and FLANG_DEFAULT_LINKER, the name of the linker may not have the .exe extension.


Full diff: https://github.com/llvm/llvm-project/pull/73157.diff

1 Files Affected:

  • (modified) flang/test/Driver/dynamic-linker.f90 (+1-1)
diff --git a/flang/test/Driver/dynamic-linker.f90 b/flang/test/Driver/dynamic-linker.f90
index 2745822dc107769..df119c22a2ea516 100644
--- a/flang/test/Driver/dynamic-linker.f90
+++ b/flang/test/Driver/dynamic-linker.f90
@@ -15,6 +15,6 @@
 ! GNU-LINKER-OPTIONS-SAME: "-rpath" "/path/to/dir"
 
 ! For MSVC, adding -static does not add any additional linker options.
-! MSVC-LINKER-OPTIONS: "{{.*}}link.exe"
+! MSVC-LINKER-OPTIONS: "{{.*}}link{{(.exe)?}}"
 ! MSVC-LINKER-OPTIONS-SAME: "-dll"
 ! MSVC-LINKER-OPTIONS-SAME: "-rpath" "/path/to/dir"

Copy link
Contributor

@tarunprabhu tarunprabhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Copy link
Contributor

@banach-space banach-space left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at

not sure why wouldn't we use plain "link" instead.

But then this is quite subtle and I don't have a Windows machine to check for myself to give an informed suggestion.

Thanks for the fix, LGTM!

@kkwli kkwli merged commit c9e347a into llvm:main Nov 23, 2023
@kkwli kkwli deleted the linker-extension branch November 23, 2023 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flang:driver flang Flang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants