================ @@ -0,0 +1,12 @@ +! Verify that the -isysroot flag is known to the frontend and, on Darwin, +! is passed on to the linker. + +! RUN: %flang -### --target=aarch64-apple-darwin -isysroot /path/to/sysroot \ +! RUN: %s 2>&1 | FileCheck %s --check-prefix=CHECK-DARWIN +! RUN: %flang -### --target=aarch64-linux-gnu -isysroot /path/to/sysroot \ +! RUN: %s 2>&1 | FileCheck %s --check-prefix=CHECK-LINUX + +! CHECK-DARWIN: "{{.*[\/]}}ld" {{.*}}"-syslibroot" "/path/to/sysroot" +! Unused on Linux. +! CHECK-LINUX: warning: argument unused during compilation: '-isysroot /path/to/sysroot' ---------------- luporl wrote:
There is actually a way to test generating executables on Darwin, by using the sysroot detected by CMake. I've added this test to `exec-darwin.f90`. `FlangDriver.md` has been expanded with your suggestions. I guess that is enough for the docs, right? https://github.com/llvm/llvm-project/pull/77365 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits