[flang] [clang] [flang][driver] Add support for -isysroot in the frontend (PR #77365)
Andrzej WarzyĆski via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 9 04:58:44 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:
This doesn't feel right - why is it ignored on Linux?
https://github.com/llvm/llvm-project/pull/77365
More information about the cfe-commits
mailing list