[flang-commits] [flang] [clang] [flang][driver] Don't use -whole-archive on Darwin (PR #75393)

via flang-commits flang-commits at lists.llvm.org
Thu Dec 14 10:28:19 PST 2023


kkwli wrote:

> > Unrelated to this PR, but may I ask how do you configure flang, to make it link without errors and without extra flags? I need to add `-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib`.
> 
> AFAIK, what you really want is this: `-isysroot $(xcrun --sdk-path)`. Today this happens to be:
> 
>     * `-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib`.
> 
> 
> But there's no guarantee that this won't change in the future. Now, one should be able to "fix it" within one build of Clang with [DEFAULT_SYSROOT](https://github.com/llvm/llvm-project/blob/c64334fb30f8a8087c218b6d7ec954ad47b33947/clang/CMakeLists.txt#L177-L178). If that works for you - could you document in the Flang docs? 🙏🏻

I already have `-DDEFAULT_SYSROOT="$(xcrun --show-sdk-path)"` in my cmake command.


https://github.com/llvm/llvm-project/pull/75393


More information about the flang-commits mailing list