[clang] 874bdc8 - [Driver] Clean up Debian multiarch /usr/include/<triplet> madness
Nico Weber via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 23 19:09:11 PDT 2021
Was this reviewed anywhere?
On Mon, Mar 22, 2021 at 1:40 AM Fangrui Song via cfe-commits <
cfe-commits at lists.llvm.org> wrote:
>
> Author: Fangrui Song
> Date: 2021-03-21T22:40:38-07:00
> New Revision: 874bdc8e61662b5f39a9626b9132e0979fae556f
>
> URL:
> https://github.com/llvm/llvm-project/commit/874bdc8e61662b5f39a9626b9132e0979fae556f
> DIFF:
> https://github.com/llvm/llvm-project/commit/874bdc8e61662b5f39a9626b9132e0979fae556f.diff
>
> LOG: [Driver] Clean up Debian multiarch /usr/include/<triplet> madness
>
> Debian multiarch additionally adds /usr/include/<triplet> and somehow
> Android borrowed the idea. (Note /usr/<triplet>/include is already an
> include dir...). On Debian, we should just assume a GCC installation is
> available and use its triple.
>
> Added:
>
> clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/arm-linux-gnueabi/crt1.o
>
> clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/arm-linux-gnueabi/crti.o
>
> clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/arm-linux-gnueabi/crtn.o
>
> clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/arm-linux-gnueabihf/crt1.o
>
> clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/arm-linux-gnueabihf/crti.o
>
> clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/arm-linux-gnueabihf/crtn.o
>
> clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/armeb-linux-gnueabi/crt1.o
>
> clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/armeb-linux-gnueabi/crti.o
>
> clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/armeb-linux-gnueabi/crtn.o
>
> clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/armeb-linux-gnueabihf/crt1.o
>
> clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/armeb-linux-gnueabihf/crti.o
>
> clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/armeb-linux-gnueabihf/crtn.o
>
> clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/gcc/arm-linux-gnueabi/10/crtbegin.o
>
> clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/gcc/arm-linux-gnueabihf/10/crtbegin.o
>
> clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/gcc/armeb-linux-gnueabi/10/crtbegin.o
>
> clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/gcc/armeb-linux-gnueabihf/10/crtbegin.o
>
> clang/test/Driver/Inputs/multilib_arm_linux_tree/usr/include/arm-linux-gnueabihf/.keep
>
> clang/test/Driver/Inputs/multilib_arm_linux_tree/usr/include/armeb-linux-gnueabi/.keep
>
> clang/test/Driver/Inputs/multilib_arm_linux_tree/usr/include/armeb-linux-gnueabihf/.keep
>
> Modified:
> clang/lib/Driver/ToolChains/Gnu.cpp
> clang/lib/Driver/ToolChains/Linux.cpp
> clang/test/Driver/arm-multilibs.c
>
> Removed:
>
> clang/test/Driver/Inputs/multilib_armeb_linux_tree/usr/include/armeb-linux-gnueabi/.keep
>
> clang/test/Driver/Inputs/multilib_armebhf_linux_tree/usr/include/armeb-linux-gnueabihf/.keep
>
> clang/test/Driver/Inputs/multilib_armhf_linux_tree/usr/include/arm-linux-gnueabihf/.keep
>
>
>
> ################################################################################
> diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp
> b/clang/lib/Driver/ToolChains/Gnu.cpp
> index c554047beac3..972044fb615e 100644
> --- a/clang/lib/Driver/ToolChains/Gnu.cpp
> +++ b/clang/lib/Driver/ToolChains/Gnu.cpp
> @@ -2999,8 +2999,6 @@ Generic_GCC::addGCCLibStdCxxIncludePaths(const
> llvm::opt::ArgList &DriverArgs,
> const Multilib &Multilib = GCCInstallation.getMultilib();
> const std::string Triple = getMultiarchTriple(
> getDriver(), GCCInstallation.getTriple(), getDriver().SysRoot);
> - const std::string TargetMultiarchTriple =
> - getMultiarchTriple(getDriver(), getTriple(), getDriver().SysRoot);
> const GCCVersion &Version = GCCInstallation.getVersion();
>
> // Try /../$triple/include/c++/$version then /../include/c++/$version.
>
> diff --git a/clang/lib/Driver/ToolChains/Linux.cpp
> b/clang/lib/Driver/ToolChains/Linux.cpp
> index cbfa5152bc8e..e889791d19b2 100644
> --- a/clang/lib/Driver/ToolChains/Linux.cpp
> +++ b/clang/lib/Driver/ToolChains/Linux.cpp
> @@ -604,172 +604,16 @@ void Linux::AddClangSystemIncludeArgs(const ArgList
> &DriverArgs,
> return;
> }
>
> - // Implement generic Debian multiarch support.
> - const StringRef X86_64MultiarchIncludeDirs[] = {
> - "/usr/include/x86_64-linux-gnu",
> -
> - // FIXME: These are older forms of multiarch. It's not clear that
> they're
> - // in use in any released version of Debian, so we should consider
> - // removing them.
> - "/usr/include/i686-linux-gnu/64", "/usr/include/i486-linux-gnu/64"};
> - const StringRef X86MultiarchIncludeDirs[] = {
> - "/usr/include/i386-linux-gnu",
> -
> - // FIXME: These are older forms of multiarch. It's not clear that
> they're
> - // in use in any released version of Debian, so we should consider
> - // removing them.
> - "/usr/include/x86_64-linux-gnu/32", "/usr/include/i686-linux-gnu",
> - "/usr/include/i486-linux-gnu"};
> - const StringRef AArch64MultiarchIncludeDirs[] = {
> - "/usr/include/aarch64-linux-gnu"};
> - const StringRef ARMMultiarchIncludeDirs[] = {
> - "/usr/include/arm-linux-gnueabi"};
> - const StringRef ARMHFMultiarchIncludeDirs[] = {
> - "/usr/include/arm-linux-gnueabihf"};
> - const StringRef ARMEBMultiarchIncludeDirs[] = {
> - "/usr/include/armeb-linux-gnueabi"};
> - const StringRef ARMEBHFMultiarchIncludeDirs[] = {
> - "/usr/include/armeb-linux-gnueabihf"};
> - const StringRef M68kMultiarchIncludeDirs[] =
> {"/usr/include/m68k-linux-gnu"};
> - const StringRef MIPSMultiarchIncludeDirs[] =
> {"/usr/include/mips-linux-gnu"};
> - const StringRef MIPSELMultiarchIncludeDirs[] = {
> - "/usr/include/mipsel-linux-gnu"};
> - const StringRef MIPS64MultiarchIncludeDirs[] = {
> - "/usr/include/mips64-linux-gnuabi64"};
> - const StringRef MIPS64ELMultiarchIncludeDirs[] = {
> - "/usr/include/mips64el-linux-gnuabi64"};
> - const StringRef MIPSN32MultiarchIncludeDirs[] = {
> - "/usr/include/mips64-linux-gnuabin32"};
> - const StringRef MIPSN32ELMultiarchIncludeDirs[] = {
> - "/usr/include/mips64el-linux-gnuabin32"};
> - const StringRef MIPSR6MultiarchIncludeDirs[] = {
> - "/usr/include/mipsisa32-linux-gnu"};
> - const StringRef MIPSR6ELMultiarchIncludeDirs[] = {
> - "/usr/include/mipsisa32r6el-linux-gnu"};
> - const StringRef MIPS64R6MultiarchIncludeDirs[] = {
> - "/usr/include/mipsisa64r6-linux-gnuabi64"};
> - const StringRef MIPS64R6ELMultiarchIncludeDirs[] = {
> - "/usr/include/mipsisa64r6el-linux-gnuabi64"};
> - const StringRef MIPSN32R6MultiarchIncludeDirs[] = {
> - "/usr/include/mipsisa64r6-linux-gnuabin32"};
> - const StringRef MIPSN32R6ELMultiarchIncludeDirs[] = {
> - "/usr/include/mipsisa64r6el-linux-gnuabin32"};
> - const StringRef PPCMultiarchIncludeDirs[] = {
> - "/usr/include/powerpc-linux-gnu",
> - "/usr/include/powerpc-linux-gnuspe"};
> - const StringRef PPCLEMultiarchIncludeDirs[] = {
> - "/usr/include/powerpcle-linux-gnu"};
> - const StringRef PPC64MultiarchIncludeDirs[] = {
> - "/usr/include/powerpc64-linux-gnu"};
> - const StringRef PPC64LEMultiarchIncludeDirs[] = {
> - "/usr/include/powerpc64le-linux-gnu"};
> - const StringRef SparcMultiarchIncludeDirs[] = {
> - "/usr/include/sparc-linux-gnu"};
> - const StringRef Sparc64MultiarchIncludeDirs[] = {
> - "/usr/include/sparc64-linux-gnu"};
> - const StringRef SYSTEMZMultiarchIncludeDirs[] = {
> - "/usr/include/s390x-linux-gnu"};
> - ArrayRef<StringRef> MultiarchIncludeDirs;
> - switch (getTriple().getArch()) {
> - case llvm::Triple::x86_64:
> - MultiarchIncludeDirs = X86_64MultiarchIncludeDirs;
> - break;
> - case llvm::Triple::x86:
> - MultiarchIncludeDirs = X86MultiarchIncludeDirs;
> - break;
> - case llvm::Triple::aarch64:
> - case llvm::Triple::aarch64_be:
> - MultiarchIncludeDirs = AArch64MultiarchIncludeDirs;
> - break;
> - case llvm::Triple::arm:
> - case llvm::Triple::thumb:
> - if (getTriple().getEnvironment() == llvm::Triple::GNUEABIHF)
> - MultiarchIncludeDirs = ARMHFMultiarchIncludeDirs;
> - else
> - MultiarchIncludeDirs = ARMMultiarchIncludeDirs;
> - break;
> - case llvm::Triple::armeb:
> - case llvm::Triple::thumbeb:
> - if (getTriple().getEnvironment() == llvm::Triple::GNUEABIHF)
> - MultiarchIncludeDirs = ARMEBHFMultiarchIncludeDirs;
> - else
> - MultiarchIncludeDirs = ARMEBMultiarchIncludeDirs;
> - break;
> - case llvm::Triple::m68k:
> - MultiarchIncludeDirs = M68kMultiarchIncludeDirs;
> - break;
> - case llvm::Triple::mips:
> - if (getTriple().getSubArch() == llvm::Triple::MipsSubArch_r6)
> - MultiarchIncludeDirs = MIPSR6MultiarchIncludeDirs;
> - else
> - MultiarchIncludeDirs = MIPSMultiarchIncludeDirs;
> - break;
> - case llvm::Triple::mipsel:
> - if (getTriple().getSubArch() == llvm::Triple::MipsSubArch_r6)
> - MultiarchIncludeDirs = MIPSR6ELMultiarchIncludeDirs;
> - else
> - MultiarchIncludeDirs = MIPSELMultiarchIncludeDirs;
> - break;
> - case llvm::Triple::mips64:
> - if (getTriple().getSubArch() == llvm::Triple::MipsSubArch_r6)
> - if (getTriple().getEnvironment() == llvm::Triple::GNUABIN32)
> - MultiarchIncludeDirs = MIPSN32R6MultiarchIncludeDirs;
> - else
> - MultiarchIncludeDirs = MIPS64R6MultiarchIncludeDirs;
> - else if (getTriple().getEnvironment() == llvm::Triple::GNUABIN32)
> - MultiarchIncludeDirs = MIPSN32MultiarchIncludeDirs;
> - else
> - MultiarchIncludeDirs = MIPS64MultiarchIncludeDirs;
> - break;
> - case llvm::Triple::mips64el:
> - if (getTriple().getSubArch() == llvm::Triple::MipsSubArch_r6)
> - if (getTriple().getEnvironment() == llvm::Triple::GNUABIN32)
> - MultiarchIncludeDirs = MIPSN32R6ELMultiarchIncludeDirs;
> - else
> - MultiarchIncludeDirs = MIPS64R6ELMultiarchIncludeDirs;
> - else if (getTriple().getEnvironment() == llvm::Triple::GNUABIN32)
> - MultiarchIncludeDirs = MIPSN32ELMultiarchIncludeDirs;
> - else
> - MultiarchIncludeDirs = MIPS64ELMultiarchIncludeDirs;
> - break;
> - case llvm::Triple::ppc:
> - MultiarchIncludeDirs = PPCMultiarchIncludeDirs;
> - break;
> - case llvm::Triple::ppcle:
> - MultiarchIncludeDirs = PPCLEMultiarchIncludeDirs;
> - break;
> - case llvm::Triple::ppc64:
> - MultiarchIncludeDirs = PPC64MultiarchIncludeDirs;
> - break;
> - case llvm::Triple::ppc64le:
> - MultiarchIncludeDirs = PPC64LEMultiarchIncludeDirs;
> - break;
> - case llvm::Triple::sparc:
> - MultiarchIncludeDirs = SparcMultiarchIncludeDirs;
> - break;
> - case llvm::Triple::sparcv9:
> - MultiarchIncludeDirs = Sparc64MultiarchIncludeDirs;
> - break;
> - case llvm::Triple::systemz:
> - MultiarchIncludeDirs = SYSTEMZMultiarchIncludeDirs;
> - break;
> - default:
> - break;
> - }
> -
> - const std::string AndroidMultiarchIncludeDir =
> - std::string("/usr/include/") +
> - getMultiarchTriple(D, getTriple(), SysRoot);
> - const StringRef AndroidMultiarchIncludeDirs[] =
> {AndroidMultiarchIncludeDir};
> + // On Android and Debian, add /usr/include/$triple if exists. On
> Debian, we
> + // can assume a GCC installation is available.
> + std::string MultiarchIncludeDir;
> if (getTriple().isAndroid())
> - MultiarchIncludeDirs = AndroidMultiarchIncludeDirs;
> -
> - for (StringRef Dir : MultiarchIncludeDirs) {
> - if (D.getVFS().exists(SysRoot + Dir)) {
> - addExternCSystemInclude(DriverArgs, CC1Args, SysRoot + Dir);
> - break;
> - }
> - }
> + MultiarchIncludeDir = getMultiarchTriple(D, getTriple(), SysRoot);
> + else if (GCCInstallation.isValid())
> + MultiarchIncludeDir = GCCInstallation.getTriple().str();
> + if (!MultiarchIncludeDir.empty() &&
> + D.getVFS().exists(SysRoot + "/usr/include/" + MultiarchIncludeDir))
> + addExternCSystemInclude(DriverArgs, CC1Args, SysRoot +
> "/usr/include/" + MultiarchIncludeDir);
>
> if (getTriple().getOS() == llvm::Triple::RTEMS)
> return;
>
> diff --git
> a/clang/test/Driver/Inputs/multilib_armeb_linux_tree/usr/include/armeb-linux-gnueabi/.keep
> b/clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/arm-linux-gnueabi/crt1.o
> similarity index 100%
> rename from
> clang/test/Driver/Inputs/multilib_armeb_linux_tree/usr/include/armeb-linux-gnueabi/.keep
> rename to
> clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/arm-linux-gnueabi/crt1.o
>
> diff --git
> a/clang/test/Driver/Inputs/multilib_armebhf_linux_tree/usr/include/armeb-linux-gnueabihf/.keep
> b/clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/arm-linux-gnueabi/crti.o
> similarity index 100%
> rename from
> clang/test/Driver/Inputs/multilib_armebhf_linux_tree/usr/include/armeb-linux-gnueabihf/.keep
> rename to
> clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/arm-linux-gnueabi/crti.o
>
> diff --git
> a/clang/test/Driver/Inputs/multilib_armhf_linux_tree/usr/include/arm-linux-gnueabihf/.keep
> b/clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/arm-linux-gnueabi/crtn.o
> similarity index 100%
> rename from
> clang/test/Driver/Inputs/multilib_armhf_linux_tree/usr/include/arm-linux-gnueabihf/.keep
> rename to
> clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/arm-linux-gnueabi/crtn.o
>
> diff --git
> a/clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/arm-linux-gnueabihf/crt1.o
> b/clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/arm-linux-gnueabihf/crt1.o
> new file mode 100644
> index 000000000000..e69de29bb2d1
>
> diff --git
> a/clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/arm-linux-gnueabihf/crti.o
> b/clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/arm-linux-gnueabihf/crti.o
> new file mode 100644
> index 000000000000..e69de29bb2d1
>
> diff --git
> a/clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/arm-linux-gnueabihf/crtn.o
> b/clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/arm-linux-gnueabihf/crtn.o
> new file mode 100644
> index 000000000000..e69de29bb2d1
>
> diff --git
> a/clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/armeb-linux-gnueabi/crt1.o
> b/clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/armeb-linux-gnueabi/crt1.o
> new file mode 100644
> index 000000000000..e69de29bb2d1
>
> diff --git
> a/clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/armeb-linux-gnueabi/crti.o
> b/clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/armeb-linux-gnueabi/crti.o
> new file mode 100644
> index 000000000000..e69de29bb2d1
>
> diff --git
> a/clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/armeb-linux-gnueabi/crtn.o
> b/clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/armeb-linux-gnueabi/crtn.o
> new file mode 100644
> index 000000000000..e69de29bb2d1
>
> diff --git
> a/clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/armeb-linux-gnueabihf/crt1.o
> b/clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/armeb-linux-gnueabihf/crt1.o
> new file mode 100644
> index 000000000000..e69de29bb2d1
>
> diff --git
> a/clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/armeb-linux-gnueabihf/crti.o
> b/clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/armeb-linux-gnueabihf/crti.o
> new file mode 100644
> index 000000000000..e69de29bb2d1
>
> diff --git
> a/clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/armeb-linux-gnueabihf/crtn.o
> b/clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/armeb-linux-gnueabihf/crtn.o
> new file mode 100644
> index 000000000000..e69de29bb2d1
>
> diff --git
> a/clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/gcc/arm-linux-gnueabi/10/crtbegin.o
> b/clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/gcc/arm-linux-gnueabi/10/crtbegin.o
> new file mode 100644
> index 000000000000..e69de29bb2d1
>
> diff --git
> a/clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/gcc/arm-linux-gnueabihf/10/crtbegin.o
> b/clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/gcc/arm-linux-gnueabihf/10/crtbegin.o
> new file mode 100644
> index 000000000000..e69de29bb2d1
>
> diff --git
> a/clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/gcc/armeb-linux-gnueabi/10/crtbegin.o
> b/clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/gcc/armeb-linux-gnueabi/10/crtbegin.o
> new file mode 100644
> index 000000000000..e69de29bb2d1
>
> diff --git
> a/clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/gcc/armeb-linux-gnueabihf/10/crtbegin.o
> b/clang/test/Driver/Inputs/multilib_arm_linux_tree/lib/gcc/armeb-linux-gnueabihf/10/crtbegin.o
> new file mode 100644
> index 000000000000..e69de29bb2d1
>
> diff --git
> a/clang/test/Driver/Inputs/multilib_arm_linux_tree/usr/include/arm-linux-gnueabihf/.keep
> b/clang/test/Driver/Inputs/multilib_arm_linux_tree/usr/include/arm-linux-gnueabihf/.keep
> new file mode 100644
> index 000000000000..e69de29bb2d1
>
> diff --git
> a/clang/test/Driver/Inputs/multilib_arm_linux_tree/usr/include/armeb-linux-gnueabi/.keep
> b/clang/test/Driver/Inputs/multilib_arm_linux_tree/usr/include/armeb-linux-gnueabi/.keep
> new file mode 100644
> index 000000000000..e69de29bb2d1
>
> diff --git
> a/clang/test/Driver/Inputs/multilib_arm_linux_tree/usr/include/armeb-linux-gnueabihf/.keep
> b/clang/test/Driver/Inputs/multilib_arm_linux_tree/usr/include/armeb-linux-gnueabihf/.keep
> new file mode 100644
> index 000000000000..e69de29bb2d1
>
> diff --git a/clang/test/Driver/arm-multilibs.c
> b/clang/test/Driver/arm-multilibs.c
> index bd9c80e8b16a..3ec9ea0b97c5 100644
> --- a/clang/test/Driver/arm-multilibs.c
> +++ b/clang/test/Driver/arm-multilibs.c
> @@ -1,14 +1,14 @@
> -// RUN: %clang -target armv7-linux-gnueabi
> --sysroot=%S/Inputs/multilib_arm_linux_tree -### -c %s -o /dev/null 2>&1 |
> FileCheck -check-prefix CHECK-ARM %s
> -// RUN: %clang -target thumbv7-linux-gnueabi
> --sysroot=%S/Inputs/multilib_arm_linux_tree -### -c %s -o /dev/null 2>&1 |
> FileCheck -check-prefix CHECK-ARM %s
> +// RUN: %clang --target=armv7-linux-gnueabi
> --sysroot=%S/Inputs/multilib_arm_linux_tree -### -c %s 2>&1 | FileCheck
> --check-prefix=CHECK-ARM %s
> +// RUN: %clang --target=thumbv7-linux-gnueabi
> --sysroot=%S/Inputs/multilib_arm_linux_tree -### -c %s 2>&1 | FileCheck
> --check-prefix=CHECK-ARM %s
>
> -// RUN: %clang -target armv7-linux-gnueabihf
> --sysroot=%S/Inputs/multilib_armhf_linux_tree -### -c %s -o /dev/null 2>&1
> | FileCheck -check-prefix CHECK-ARMHF %s
> -// RUN: %clang -target thumbv7-linux-gnueabihf
> --sysroot=%S/Inputs/multilib_armhf_linux_tree -### -c %s -o /dev/null 2>&1
> | FileCheck -check-prefix CHECK-ARMHF %s
> +// RUN: %clang --target=armv7-linux-gnueabihf
> --sysroot=%S/Inputs/multilib_arm_linux_tree -### -c %s 2>&1 | FileCheck
> --check-prefix=CHECK-ARMHF %s
> +// RUN: %clang --target=thumbv7-linux-gnueabihf
> --sysroot=%S/Inputs/multilib_arm_linux_tree -### -c %s 2>&1 | FileCheck
> --check-prefix=CHECK-ARMHF %s
>
> -// RUN: %clang -target armv7eb-linux-gnueabi
> --sysroot=%S/Inputs/multilib_armeb_linux_tree -### -c %s -o /dev/null 2>&1
> | FileCheck -check-prefix CHECK-ARMEB %s
> -// RUN: %clang -target thumbv7eb-linux-gnueabi
> --sysroot=%S/Inputs/multilib_armeb_linux_tree -### -c %s -o /dev/null 2>&1
> | FileCheck -check-prefix CHECK-ARMEB %s
> +// RUN: %clang --target=armv7eb-linux-gnueabi
> --sysroot=%S/Inputs/multilib_arm_linux_tree -### -c %s 2>&1 | FileCheck
> --check-prefix=CHECK-ARMEB %s
> +// RUN: %clang --target=thumbv7eb-linux-gnueabi
> --sysroot=%S/Inputs/multilib_arm_linux_tree -### -c %s 2>&1 | FileCheck
> --check-prefix=CHECK-ARMEB %s
>
> -// RUN: %clang -target armv7eb-linux-gnueabihf
> --sysroot=%S/Inputs/multilib_armebhf_linux_tree -### -c %s -o /dev/null
> 2>&1 | FileCheck -check-prefix CHECK-ARMEBHF %s
> -// RUN: %clang -target thumbv7eb-linux-gnueabihf
> --sysroot=%S/Inputs/multilib_armebhf_linux_tree -### -c %s -o /dev/null
> 2>&1 | FileCheck -check-prefix CHECK-ARMEBHF %s
> +// RUN: %clang --target=armv7eb-linux-gnueabihf
> --sysroot=%S/Inputs/multilib_arm_linux_tree -### -c %s 2>&1 | FileCheck
> --check-prefix=CHECK-ARMEBHF %s
> +// RUN: %clang --target=thumbv7eb-linux-gnueabihf
> --sysroot=%S/Inputs/multilib_arm_linux_tree -### -c %s 2>&1 | FileCheck
> --check-prefix=CHECK-ARMEBHF %s
>
> // CHECK-ARM: "-internal-externc-isystem"
> "{{.*}}/usr/include/arm-linux-gnueabi"
> // CHECK-ARMHF: "-internal-externc-isystem"
> "{{.*}}/usr/include/arm-linux-gnueabihf"
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210323/c1d8499c/attachment-0001.html>
More information about the cfe-commits
mailing list