Author: Fangrui Song Date: 2022-08-31T10:31:45-07:00 New Revision: 66f3e90cf8225333273bfaddc1a7f832fe0c263d
URL: https://github.com/llvm/llvm-project/commit/66f3e90cf8225333273bfaddc1a7f832fe0c263d DIFF: https://github.com/llvm/llvm-project/commit/66f3e90cf8225333273bfaddc1a7f832fe0c263d.diff LOG: [Driver][test] Test -dumpmachine Added: clang/test/Driver/dumpmachine.c Modified: Removed: ################################################################################ diff --git a/clang/test/Driver/dumpmachine.c b/clang/test/Driver/dumpmachine.c new file mode 100644 index 0000000000000..41dda5590eb82 --- /dev/null +++ b/clang/test/Driver/dumpmachine.c @@ -0,0 +1,12 @@ +/// Test that -dumpmachine prints the target triple. + +/// Note: Debian GCC may omit "unknown-". +// RUN: %clang --target=x86_64-linux-gnu -dumpmachine | FileCheck %s --check-prefix=X86_64 +// X86_64: x86_64-unknown-linux-gnu + +/// Note: GCC doesn't convert -dumpmachine output for multilib -m32/-mx32/-m64. +// RUN: %clang --target=x86_64-redhat-linux -m32 -dumpmachine | FileCheck %s --check-prefix=X86_64_M32 +// X86_64_M32: i386-redhat-linux + +// RUN: %clang --target=xxx-pc-freebsd -dumpmachine | FileCheck %s --check-prefix=FREEBSD +// FREEBSD: xxx-pc-freebsd _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits