[flang-commits] [clang] [flang] [flang][driver] Add support for -isysroot in the frontend (PR #77365)
Andrzej WarzyĆski via flang-commits
flang-commits at lists.llvm.org
Tue Jan 9 07:45:25 PST 2024
================
@@ -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'
----------------
banach-space wrote:
Thank you for the explanation - I think that it would be really helpful to expand the docs a bit more. Also, given that `-isysroot` is critical for generating executables on Darwin, it would be great to test exactly that. But not sure how to achieve that without knowing the location of system libraries on Darwin :/
https://github.com/llvm/llvm-project/pull/77365
More information about the flang-commits
mailing list