luporl wrote:

Since this patch I can't build binaries with flang-new on macOS anymore:
```
$ /Users/leandro.lupori/git/flang-luporl/buildr/bin/flang-new -v -fopenmp -o 
stest.exe stest.o 
-L/Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk/usr/lib
flang-new version 18.0.0git (g...@github.com:luporl/llvm-project.git 
bfe1630bdda6714721e2e70a2327226ab7a94626)
Target: arm64-apple-darwin23.2.0
Thread model: posix
InstalledDir: /Users/leandro.lupori/git/flang-luporl/buildr/bin
 "/usr/bin/ld" -demangle -lto_library 
/Users/leandro.lupori/git/flang-luporl/buildr/lib/libLTO.dylib -dynamic -arch 
arm64 -platform_version macos 14.0.0 14.0.0 -mllvm 
-enable-linkonceodr-outlining -o stest.exe 
-L/Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk/usr/lib stest.o 
-L/Users/leandro.lupori/git/flang-luporl/buildr/lib --whole-archive 
-lFortran_main --no-whole-archive -lFortranRuntime -lFortranDecimal -lomp 
-L/Users/leandro.lupori/git/flang-luporl/buildr/lib -lSystem
ld: unknown options: --whole-archive --no-whole-archive
flang-new: error: linker command failed with exit code 1 (use -v to see 
invocation)
```

The command line above works fine when I revert this patch (and #74139, to 
avoid dealing with conflicts).

I can also workaround it by adding `-fno-fortran-main` and `-lFortran_main` to 
the command line.

https://github.com/llvm/llvm-project/pull/73124
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to