diff --git a/clang/lib/Driver/ToolChains/AIE.cpp b/clang/lib/Driver/ToolChains/AIE.cpp index 46e1f3fa674f..33ed211c698e 100644 --- a/clang/lib/Driver/ToolChains/AIE.cpp +++ b/clang/lib/Driver/ToolChains/AIE.cpp @@ -80,6 +80,50 @@ void AIEToolChain::AddClangSystemIncludeArgs(const ArgList &DriverArgs, // Don't pull in system headers from /usr/include or /usr/local/include. // All of the basic headers that we need come from the compiler. CC1Args.push_back("-nostdsysteminc"); + + if (DriverArgs.hasArg(options::OPT_nostdlibinc)) + return; + + const Driver &D = getDriver(); + std::string Target = getTripleString(); + SmallString<128> Path(D.Dir); + llvm::sys::path::append(Path, "..", "include", Target); + if (getVFS().exists(Path)) + addExternCSystemInclude(DriverArgs, CC1Args, Path.str()); +} + +void AIEToolChain::addLibCxxIncludePaths( + const llvm::opt::ArgList &DriverArgs, + llvm::opt::ArgStringList &CC1Args) const { + + if (DriverArgs.hasArg(options::OPT_nostdinc, options::OPT_nostdlibinc, + options::OPT_nostdincxx)) + return; + + // We don't ship libc/libcxx for AIE1 + if (getTriple().isAIE1()) + return; + + const Driver &D = getDriver(); + const std::string Target = getTripleString(); + + SmallString<128> Path(D.Dir); + llvm::sys::path::append(Path, "..", "include"); + + const std::string Version = detectLibcxxVersion(Path); + if (Version.empty()) + return; + + // First add the per-target include path. + SmallString<128> TargetDir(Path); + llvm::sys::path::append(TargetDir, Target, "c++", Version); + if (getVFS().exists(TargetDir)) + addSystemInclude(DriverArgs, CC1Args, TargetDir); + + // Second add the generic one. + SmallString<128> Dir(Path); + llvm::sys::path::append(Dir, "c++", Version); + addSystemInclude(DriverArgs, CC1Args, Dir); } void AIEToolChain::addClangTargetOptions( diff --git a/clang/lib/Driver/ToolChains/AIE.h b/clang/lib/Driver/ToolChains/AIE.h index 72281e8a31bc..e6a8f9e13ba1 100644 --- a/clang/lib/Driver/ToolChains/AIE.h +++ b/clang/lib/Driver/ToolChains/AIE.h @@ -42,10 +42,12 @@ class LLVM_LIBRARY_VISIBILITY AIEToolChain : public Generic_ELF { AIEToolChain(const Driver &D, const llvm::Triple &Triple, const llvm::opt::ArgList &Args); - // No support for finding a C++ standard library yet. - void addLibCxxIncludePaths( - const llvm::opt::ArgList &DriverArgs, - llvm::opt::ArgStringList &CC1Args) const override {} + CXXStdlibType GetDefaultCXXStdlibType() const override { + return ToolChain::CST_Libcxx; + } + + void addLibCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, + llvm::opt::ArgStringList &CC1Args) const override; void addLibStdCxxIncludePaths( const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const override {} diff --git a/clang/test/CodeGen/aie/aie2/acc32.cpp b/clang/test/CodeGen/aie/aie2/acc32.cpp index 66751fe9dcc5..e58a4084a7b7 100644 --- a/clang/test/CodeGen/aie/aie2/acc32.cpp +++ b/clang/test/CodeGen/aie/aie2/acc32.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang --target=aie2 -S -emit-llvm %s -o - | FileCheck %s +// RUN: %clang --target=aie2 -nostdlibinc -S -emit-llvm %s -o - | FileCheck %s // CHECK-LABEL: @_Z3foou7__acc32( // CHECK-NEXT: entry: // CHECK-NEXT: [[ARG_ADDR:%.*]] = alloca i32, align 4 diff --git a/clang/test/CodeGen/aie/aie2/accfloat.cpp b/clang/test/CodeGen/aie/aie2/accfloat.cpp index fa90f8b75818..cdd809dfb442 100644 --- a/clang/test/CodeGen/aie/aie2/accfloat.cpp +++ b/clang/test/CodeGen/aie/aie2/accfloat.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang --target=aie2 -S -emit-llvm %s -o - | FileCheck %s +// RUN: %clang --target=aie2 -nostdlibinc -S -emit-llvm %s -o - | FileCheck %s // CHECK-LABEL: @_Z3foou10__accfloat( // CHECK-NEXT: entry: // CHECK-NEXT: [[ARG_ADDR:%.*]] = alloca i32, align 4 diff --git a/clang/test/CodeGen/aie/aie2/aie2-TargetAS-to-DefaultAS-assignment.cpp b/clang/test/CodeGen/aie/aie2/aie2-TargetAS-to-DefaultAS-assignment.cpp index e2ede0b2f915..0bbc2ce09152 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-TargetAS-to-DefaultAS-assignment.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-TargetAS-to-DefaultAS-assignment.cpp @@ -9,7 +9,7 @@ // //===----------------------------------------------------------------------===// // Test expression where pointer with AS is assigned to pointer with Default AS. -// RUN: %clang -O1 --target=aie2 -S -emit-llvm %s -o - | FileCheck %s +// RUN: %clang -O1 --target=aie2 -nostdlibinc -S -emit-llvm %s -o - | FileCheck %s // CHECK-LABEL: define dso_local noundef i32 @_Z29check_assignment_toDefault_ASPU3AS6iPi( // CHECK-SAME: ptr addrspace(6) nocapture readonly [[NUM:%.*]], ptr nocapture writeonly [[MEM:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] { diff --git a/clang/test/CodeGen/aie/aie2/aie2-abi-accumulator-float.cpp b/clang/test/CodeGen/aie/aie2/aie2-abi-accumulator-float.cpp index 40107c67da9d..214e0abb4062 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-abi-accumulator-float.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-abi-accumulator-float.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang --target=aie2 -S -emit-llvm %s -o - | FileCheck %s +// RUN: %clang --target=aie2 -nostdlibinc -S -emit-llvm %s -o - | FileCheck %s #include diff --git a/clang/test/CodeGen/aie/aie2/aie2-abi-accumulator.cpp b/clang/test/CodeGen/aie/aie2/aie2-abi-accumulator.cpp index 405c71d4d089..c991bcbcff34 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-abi-accumulator.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-abi-accumulator.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang --target=aie2 -S -emit-llvm %s -o - | FileCheck %s +// RUN: %clang --target=aie2 -nostdlibinc -S -emit-llvm %s -o - | FileCheck %s #include diff --git a/clang/test/CodeGen/aie/aie2/aie2-abi-bfloat.cpp b/clang/test/CodeGen/aie/aie2/aie2-abi-bfloat.cpp index b1f902f83eee..e451045749c9 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-abi-bfloat.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-abi-bfloat.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang --target=aie2 -D_LIBCPP_HAS_THREAD_API_PTHREAD -S -emit-llvm %s -o - | FileCheck %s +// RUN: %clang --target=aie2 -nostdlibinc -D_LIBCPP_HAS_THREAD_API_PTHREAD -S -emit-llvm %s -o - | FileCheck %s #include diff --git a/clang/test/CodeGen/aie/aie2/aie2-abi-compressed.cpp b/clang/test/CodeGen/aie/aie2/aie2-abi-compressed.cpp index 93e38370207c..061d52143cd8 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-abi-compressed.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-abi-compressed.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang --target=aie2 -S -emit-llvm %s -o - | FileCheck %s +// RUN: %clang --target=aie2 -nostdlibinc -S -emit-llvm %s -o - | FileCheck %s #include diff --git a/clang/test/CodeGen/aie/aie2/aie2-abi-sparse-compress.cpp b/clang/test/CodeGen/aie/aie2/aie2-abi-sparse-compress.cpp index c27b94cc3183..c015a5a6a9a9 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-abi-sparse-compress.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-abi-sparse-compress.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang --target=aie2 -S -emit-llvm %s -o - | FileCheck %s +// RUN: %clang --target=aie2 -nostdlibinc -S -emit-llvm %s -o - | FileCheck %s #include diff --git a/clang/test/CodeGen/aie/aie2/aie2-abi-sparse.cpp b/clang/test/CodeGen/aie/aie2/aie2-abi-sparse.cpp index 754b4f71a805..35e195f80896 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-abi-sparse.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-abi-sparse.cpp @@ -6,7 +6,7 @@ // // (c) Copyright 2024 Advanced Micro Devices, Inc. or its affiliates -// RUN: %clang --target=aie2 -S -emit-llvm %s -o - | FileCheck %s +// RUN: %clang --target=aie2 -nostdlibinc -S -emit-llvm %s -o - | FileCheck %s #include diff --git a/clang/test/CodeGen/aie/aie2/aie2-abi-vector-alignment.cpp b/clang/test/CodeGen/aie/aie2/aie2-abi-vector-alignment.cpp index ca76cc12b18c..a7e372983938 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-abi-vector-alignment.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-abi-vector-alignment.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang -target aie2 -fsyntax-only %s -o - +// RUN: %clang -target aie2 -nostdlibinc -fsyntax-only %s -o - #define VECTOR_ALIGN_16 16 #define VECTOR_ALIGN_32 32 diff --git a/clang/test/CodeGen/aie/aie2/aie2-abi-vector.cpp b/clang/test/CodeGen/aie/aie2/aie2-abi-vector.cpp index 1ac3ca066c83..82db8e083fff 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-abi-vector.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-abi-vector.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang --target=aie2 -S -emit-llvm %s -o - | FileCheck %s +// RUN: %clang --target=aie2 -nostdlibinc -S -emit-llvm %s -o - | FileCheck %s #include diff --git a/clang/test/CodeGen/aie/aie2/aie2-accfloat-intrisics.cpp b/clang/test/CodeGen/aie/aie2/aie2-accfloat-intrisics.cpp index 603475027e07..48eb5d50ffe1 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-accfloat-intrisics.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-accfloat-intrisics.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang -O2 %s --target=aie2 -S -emit-llvm -o - | FileCheck %s +// RUN: %clang -O2 %s --target=aie2 -nostdlibinc -S -emit-llvm -o - | FileCheck %s // CHECK-LABEL: @_Z13test_add_confDv16_u10__accfloatS_iii( // CHECK-NEXT: entry: diff --git a/clang/test/CodeGen/aie/aie2/aie2-addlog.cpp b/clang/test/CodeGen/aie/aie2/aie2-addlog.cpp index ed8c0559d326..c65af83072fa 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-addlog.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-addlog.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang -O2 --target=aie2 -S -emit-llvm %s -o - | FileCheck %s +// RUN: %clang -O2 --target=aie2 -nostdlibinc -S -emit-llvm %s -o - | FileCheck %s // // CHECK-LABEL: @_Z11test_selectbcc( diff --git a/clang/test/CodeGen/aie/aie2/aie2-addr-intrinsic.cpp b/clang/test/CodeGen/aie/aie2/aie2-addr-intrinsic.cpp index 507f3a791ec2..75c51691a9ae 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-addr-intrinsic.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-addr-intrinsic.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang -O2 %s --target=aie2 -S -emit-llvm -o - | FileCheck %s +// RUN: %clang -O2 %s --target=aie2 -nostdlibinc -S -emit-llvm -o - | FileCheck %s // CHECK-LABEL: @_Z14test_byte_incrPDv32_si( diff --git a/clang/test/CodeGen/aie/aie2/aie2-bank-annotation.cpp b/clang/test/CodeGen/aie/aie2/aie2-bank-annotation.cpp index 3a868d80116b..729cde5d9dfe 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-bank-annotation.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-bank-annotation.cpp @@ -9,7 +9,7 @@ // //===----------------------------------------------------------------------===// // Test to check the bank annotation for AIE2, specifically the translation of __aie_dm_resource_* to the correct address space. -// RUN: %clang -O1 --target=aie2 -S -emit-llvm %s -o - | FileCheck %s +// RUN: %clang -O1 --target=aie2 -nostdlibinc -S -emit-llvm %s -o - | FileCheck %s // CHECK-LABEL: define dso_local noundef i32 @_Z6squarePU3AS5iS0_( // CHECK-SAME: ptr addrspace(5) nocapture readonly [[NUM:%.*]], ptr addrspace(5) nocapture writeonly [[MEM:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] { diff --git a/clang/test/CodeGen/aie/aie2/aie2-bf16-intrinsics.cpp b/clang/test/CodeGen/aie/aie2/aie2-bf16-intrinsics.cpp index 9dd19d4aeef1..acd59f162746 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-bf16-intrinsics.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-bf16-intrinsics.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang -O2 %s --target=aie2 -S -emit-llvm -o - | FileCheck %s +// RUN: %clang -O2 %s --target=aie2 -nostdlibinc -S -emit-llvm -o - | FileCheck %s // CHECK-LABEL: @_Z12band_v32bf16Dv32_u6__bf16S_( // CHECK-NEXT: entry: diff --git a/clang/test/CodeGen/aie/aie2/aie2-divs.cpp b/clang/test/CodeGen/aie/aie2/aie2-divs.cpp index 8c55b041d75c..b4c01558bc90 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-divs.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-divs.cpp @@ -6,7 +6,7 @@ // // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates -// RUN: %clang -O2 %s --target=aie2 -S -emit-llvm -o - | FileCheck %s +// RUN: %clang -O2 %s --target=aie2 -nostdlibinc -S -emit-llvm -o - | FileCheck %s // CHECK-LABEL: @_Z3divii( // CHECK-NEXT: entry: // CHECK-NEXT: [[TMP0:%.*]] = tail call { i32, i32 } @llvm.aie2.divs(i32 [[A:%.*]], i32 0, i32 [[B:%.*]]) diff --git a/clang/test/CodeGen/aie/aie2/aie2-intrinsics.cpp b/clang/test/CodeGen/aie/aie2/aie2-intrinsics.cpp index d7af381bc953..a3d87af212f5 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-intrinsics.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-intrinsics.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang -O0 %s --target=aie2 -S -emit-llvm -o - | FileCheck %s +// RUN: %clang -O0 %s --target=aie2 -nostdlibinc -S -emit-llvm -o - | FileCheck %s // CHECK-LABEL: @_Z21test_mac_4x2_2x4_confiiiiii( // CHECK-NEXT: entry: diff --git a/clang/test/CodeGen/aie/aie2/aie2-ldst.cpp b/clang/test/CodeGen/aie/aie2/aie2-ldst.cpp index 72a9fe439e31..863ed52b5a70 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-ldst.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-ldst.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang -O2 %s --target=aie2 -S -emit-llvm -o - | FileCheck %s +// RUN: %clang -O2 %s --target=aie2 -nostdlibinc -S -emit-llvm -o - | FileCheck %s // CHECK-LABEL: @_Z9test_packDv32_si( // CHECK-NEXT: entry: diff --git a/clang/test/CodeGen/aie/aie2/aie2-locks.cpp b/clang/test/CodeGen/aie/aie2/aie2-locks.cpp index 4e1c97836607..26d963e10607 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-locks.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-locks.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang -O2 --target=aie2 -S -emit-llvm %s -o - | FileCheck %s +// RUN: %clang -O2 --target=aie2 -nostdlibinc -S -emit-llvm %s -o - | FileCheck %s // // CHECK-LABEL: @_Z18test_acquire_equaljj( diff --git a/clang/test/CodeGen/aie/aie2/aie2-lut-intrinsic.cpp b/clang/test/CodeGen/aie/aie2/aie2-lut-intrinsic.cpp index ae732eca0a64..10357da8b0ca 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-lut-intrinsic.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-lut-intrinsic.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang -O2 %s --target=aie2 -S -emit-llvm -o - | FileCheck %s +// RUN: %clang -O2 %s --target=aie2 -nostdlibinc -S -emit-llvm -o - | FileCheck %s // CHECK-LABEL: @_Z19test_load_lut_int32PKvS0_Dv16_i( // CHECK-NEXT: entry: diff --git a/clang/test/CodeGen/aie/aie2/aie2-operator-minus-accumulators.cpp b/clang/test/CodeGen/aie/aie2/aie2-operator-minus-accumulators.cpp index 05d2a2dbef83..49a4f35914fc 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-operator-minus-accumulators.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-operator-minus-accumulators.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang -O1 %s --target=aie2 -S -emit-llvm -o - | FileCheck %s +// RUN: %clang -O1 %s --target=aie2 -nostdlibinc -S -emit-llvm -o - | FileCheck %s // CHECK-LABEL: @_Z25test_operator_minus_acc32Dv32_u7__acc32S_( // CHECK-NEXT: entry: diff --git a/clang/test/CodeGen/aie/aie2/aie2-operator-plus-accumulators.cpp b/clang/test/CodeGen/aie/aie2/aie2-operator-plus-accumulators.cpp index 89f0447dfb06..b9dcd8c7b21e 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-operator-plus-accumulators.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-operator-plus-accumulators.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang -O1 %s --target=aie2 -S -emit-llvm -o - | FileCheck %s +// RUN: %clang -O1 %s --target=aie2 -nostdlibinc -S -emit-llvm -o - | FileCheck %s // CHECK-LABEL: @_Z24test_operator_plus_acc32Dv32_u7__acc32S_( // CHECK-NEXT: entry: diff --git a/clang/test/CodeGen/aie/aie2/aie2-pckt_header.cpp b/clang/test/CodeGen/aie/aie2/aie2-pckt_header.cpp index 2999ec53b35e..e36171f9602b 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-pckt_header.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-pckt_header.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang -O2 %s --target=aie2 -S -emit-llvm -o - | FileCheck %s +// RUN: %clang -O2 %s --target=aie2 -nostdlibinc -S -emit-llvm -o - | FileCheck %s // CHECK-LABEL: @_Z25test_put_ms_packet_headerijj( // CHECK-NEXT: entry: diff --git a/clang/test/CodeGen/aie/aie2/aie2-scalar.cpp b/clang/test/CodeGen/aie/aie2/aie2-scalar.cpp index e2a52878cc64..17e5d35888cc 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-scalar.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-scalar.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang -O2 %s --target=aie2 -S -emit-llvm -o - | FileCheck %s +// RUN: %clang -O2 %s --target=aie2 -nostdlibinc -S -emit-llvm -o - | FileCheck %s // CHECK-LABEL: @_Z15test_get_coreidv( // CHECK-NEXT: entry: diff --git a/clang/test/CodeGen/aie/aie2/aie2-sched_barrier.cpp b/clang/test/CodeGen/aie/aie2/aie2-sched_barrier.cpp index bbe4e7f5b477..c9485d270537 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-sched_barrier.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-sched_barrier.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang -O2 %s --target=aie2 -S -emit-llvm -o - | FileCheck %s +// RUN: %clang -O2 %s --target=aie2 -nostdlibinc -S -emit-llvm -o - | FileCheck %s // CHECK-LABEL: @_Z23test_scheduling_barrierv( // CHECK-NEXT: entry: diff --git a/clang/test/CodeGen/aie/aie2/aie2-scl2vec-intrinsic-bounds.cpp b/clang/test/CodeGen/aie/aie2/aie2-scl2vec-intrinsic-bounds.cpp index b1a17f2e3d4c..e1b0adba343f 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-scl2vec-intrinsic-bounds.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-scl2vec-intrinsic-bounds.cpp @@ -4,7 +4,7 @@ // // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates -// RUN: not %clang -O2 %s --target=aie2 -S -emit-llvm -o - |& FileCheck %s +// RUN: not %clang -O2 %s --target=aie2 -nostdlibinc -S -emit-llvm -o - |& FileCheck %s // CHECK: error: index out of range [0,63] char test_ext_elem_bounds(v64int8 v, int idx, int sign) { diff --git a/clang/test/CodeGen/aie/aie2/aie2-scl2vec-intrinsic.cpp b/clang/test/CodeGen/aie/aie2/aie2-scl2vec-intrinsic.cpp index fcf9400459e9..e5c7cc532c35 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-scl2vec-intrinsic.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-scl2vec-intrinsic.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang -O2 %s --target=aie2 -S -emit-llvm -o - | FileCheck %s +// RUN: %clang -O2 %s --target=aie2 -nostdlibinc -S -emit-llvm -o - | FileCheck %s // CHECK-LABEL: @_Z11test_shiftxDv16_iS_ii( diff --git a/clang/test/CodeGen/aie/aie2/aie2-set-mode.cpp b/clang/test/CodeGen/aie/aie2/aie2-set-mode.cpp index 2586bfb6d221..a1a107446d88 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-set-mode.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-set-mode.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang -O2 %s --target=aie2 -S -emit-llvm -o - | FileCheck %s +// RUN: %clang -O2 %s --target=aie2 -nostdlibinc -S -emit-llvm -o - | FileCheck %s // CHECK-LABEL: @_Z16test_set_satmodej( // CHECK-NEXT: entry: diff --git a/clang/test/CodeGen/aie/aie2/aie2-sparse-intrinsics.cpp b/clang/test/CodeGen/aie/aie2/aie2-sparse-intrinsics.cpp index 4cf8cb415ad5..1c6c721c19ad 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-sparse-intrinsics.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-sparse-intrinsics.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang -O2 %s --target=aie2 -S -emit-llvm -o - | FileCheck %s +// RUN: %clang -O2 %s --target=aie2 -nostdlibinc -S -emit-llvm -o - | FileCheck %s // CHECK-LABEL: @_Z18test_mul_4x32_32x8Dv128_h16v256uint4_sparse( // CHECK-NEXT: entry: diff --git a/clang/test/CodeGen/aie/aie2/aie2-store-load-TM.cpp b/clang/test/CodeGen/aie/aie2/aie2-store-load-TM.cpp index 7d704977d541..d645081edb5a 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-store-load-TM.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-store-load-TM.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang -O2 %s --target=aie2 -S -emit-llvm -o - | FileCheck %s +// RUN: %clang -O2 %s --target=aie2 -nostdlibinc -S -emit-llvm -o - | FileCheck %s // CHECK-LABEL: @_Z12test_read_tmj( // CHECK-NEXT: entry: diff --git a/clang/test/CodeGen/aie/aie2/aie2-stream-intrinsics.cpp b/clang/test/CodeGen/aie/aie2/aie2-stream-intrinsics.cpp index 8507b0a4b153..89f864b83b62 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-stream-intrinsics.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-stream-intrinsics.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang -O2 %s --target=aie2 -S -emit-llvm -o - | FileCheck %s +// RUN: %clang -O2 %s --target=aie2 -nostdlibinc -S -emit-llvm -o - | FileCheck %s // CHECK-LABEL: @_Z21test_get_scd_v16acc32i( // CHECK-NEXT: entry: diff --git a/clang/test/CodeGen/aie/aie2/aie2-typecast.cpp b/clang/test/CodeGen/aie/aie2/aie2-typecast.cpp index d0bfc9a95a54..ea5b3362911e 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-typecast.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-typecast.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang --target=aie2 -S -emit-llvm %s -o - | FileCheck %s +// RUN: %clang --target=aie2 -nostdlibinc -S -emit-llvm %s -o - | FileCheck %s enum class AccumClass { Int }; template diff --git a/clang/test/CodeGen/aie/aie2/aie2-undef-vectors.cpp b/clang/test/CodeGen/aie/aie2/aie2-undef-vectors.cpp index e1986e3fa697..19b1dae61b5a 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-undef-vectors.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-undef-vectors.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang -O2 %s --target=aie2 -S -emit-llvm -o - | FileCheck %s +// RUN: %clang -O2 %s --target=aie2 -nostdlibinc -S -emit-llvm -o - | FileCheck %s // CHECK-LABEL: @_Z18test_undef_v32int4v( // CHECK-NEXT: entry: diff --git a/clang/test/CodeGen/aie/aie2/aie2-unsupported-operator-accumulators.cpp b/clang/test/CodeGen/aie/aie2/aie2-unsupported-operator-accumulators.cpp index 1a025a942f5d..2d5b9c05c2af 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-unsupported-operator-accumulators.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-unsupported-operator-accumulators.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: not %clang -O1 %s --target=aie2 -ferror-limit=100 -S -emit-llvm -o - 2>&1 | FileCheck %s +// RUN: not %clang -O1 %s --target=aie2 -nostdlibinc -ferror-limit=100 -S -emit-llvm -o - 2>&1 | FileCheck %s // CHECK: error: cannot compile this operator for accumulator type yet v8accfloat test_operator_plus_accfloat(v8accfloat a, v8accfloat b) { diff --git a/clang/test/CodeGen/aie/aie2/aie2-upd-ext-intrinsic-bounds.cpp b/clang/test/CodeGen/aie/aie2/aie2-upd-ext-intrinsic-bounds.cpp index 8fb3fbc8a64a..63f65f8bb62d 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-upd-ext-intrinsic-bounds.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-upd-ext-intrinsic-bounds.cpp @@ -4,7 +4,7 @@ // // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates -// RUN: not %clang -O2 %s --target=aie2 -S -emit-llvm -o - |& FileCheck %s +// RUN: not %clang -O2 %s --target=aie2 -nostdlibinc -S -emit-llvm -o - |& FileCheck %s // CHECK: error: index out of range [0,3] v32uint4 test_extract_v32uint4(v128uint4 a, int idx) { diff --git a/clang/test/CodeGen/aie/aie2/aie2-upd-ext-intrinsic.cpp b/clang/test/CodeGen/aie/aie2/aie2-upd-ext-intrinsic.cpp index 0d4f67637d61..ed96e64c1244 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-upd-ext-intrinsic.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-upd-ext-intrinsic.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang -O2 %s --target=aie2 -S -emit-llvm -o - | FileCheck %s +// RUN: %clang -O2 %s --target=aie2 -nostdlibinc -S -emit-llvm -o - | FileCheck %s // CHECK-LABEL: @_Z12test_ext_w64Dv2_jijij( // CHECK-NEXT: entry: diff --git a/clang/test/CodeGen/aie/aie2/aie2-vector-align.cpp b/clang/test/CodeGen/aie/aie2/aie2-vector-align.cpp index 99c510dba4f1..89093f48403c 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-vector-align.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-vector-align.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang -O2 %s --target=aie2 -S -emit-llvm -o - | FileCheck %s +// RUN: %clang -O2 %s --target=aie2 -nostdlibinc -S -emit-llvm -o - | FileCheck %s void take_vector(v16uint16 &a); diff --git a/clang/test/CodeGen/aie/aie2/aie2-vector-intrinsic.cpp b/clang/test/CodeGen/aie/aie2/aie2-vector-intrinsic.cpp index 3482bf105a99..2b55781a8b3d 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-vector-intrinsic.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-vector-intrinsic.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang -O2 %s --target=aie2 -S -emit-llvm -o - | FileCheck %s +// RUN: %clang -O2 %s --target=aie2 -nostdlibinc -S -emit-llvm -o - | FileCheck %s // CHECK-LABEL: @_Z21test_mac_4x2_2x4_confiiiiii( // CHECK-NEXT: entry: // CHECK-NEXT: [[TMP0:%.*]] = tail call noundef <16 x i32> @llvm.aie2.v16int32() diff --git a/clang/test/CodeGen/aie/aie2/aie2-vector-type-cast.cpp b/clang/test/CodeGen/aie/aie2/aie2-vector-type-cast.cpp index a480a087fee9..5692c80294e7 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-vector-type-cast.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-vector-type-cast.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang -O1 --target=aie2 -S -emit-llvm %s -o - | FileCheck %s +// RUN: %clang -O1 --target=aie2 -nostdlibinc -S -emit-llvm %s -o - | FileCheck %s #include diff --git a/clang/test/CodeGen/aie/aie2/aie2-vld-sparse-intrinsic.cpp b/clang/test/CodeGen/aie/aie2/aie2-vld-sparse-intrinsic.cpp index f4e394eed048..7109b18b992e 100644 --- a/clang/test/CodeGen/aie/aie2/aie2-vld-sparse-intrinsic.cpp +++ b/clang/test/CodeGen/aie/aie2/aie2-vld-sparse-intrinsic.cpp @@ -1,5 +1,5 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py -// RUN: %clang -O2 %s --target=aie2 -S -emit-llvm -o - | FileCheck %s +// RUN: %clang -O2 %s --target=aie2 -nostdlibinc -S -emit-llvm -o - | FileCheck %s /*v64int16_sparse*/ diff --git a/clang/test/CodeGen/aie/aie2/aiev2-srs-intrinsics.cpp b/clang/test/CodeGen/aie/aie2/aiev2-srs-intrinsics.cpp index 7d1a9136cdd7..f93af7bb5207 100644 --- a/clang/test/CodeGen/aie/aie2/aiev2-srs-intrinsics.cpp +++ b/clang/test/CodeGen/aie/aie2/aiev2-srs-intrinsics.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang -O2 %s --target=aie2 -S -emit-llvm -o - | FileCheck %s +// RUN: %clang -O2 %s --target=aie2 -nostdlibinc -S -emit-llvm -o - | FileCheck %s // CHECK-LABEL: @_Z19test_to_v16bfloat16Dv16_u10__accfloat( // CHECK-NEXT: entry: diff --git a/clang/test/CodeGen/aie/aie2/aiev2-ups-intrinsics.cpp b/clang/test/CodeGen/aie/aie2/aiev2-ups-intrinsics.cpp index 5d05fa2e9cf8..479dbf22558d 100644 --- a/clang/test/CodeGen/aie/aie2/aiev2-ups-intrinsics.cpp +++ b/clang/test/CodeGen/aie/aie2/aiev2-ups-intrinsics.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang -O2 %s --target=aie2 -S -emit-llvm -o - | FileCheck %s +// RUN: %clang -O2 %s --target=aie2 -nostdlibinc -S -emit-llvm -o - | FileCheck %s // CHECK-LABEL: @_Z9test_lupsDv8_ii( // CHECK-NEXT: entry: diff --git a/clang/test/CodeGen/aie/aie2/aiev2-vadd-intrinsics.cpp b/clang/test/CodeGen/aie/aie2/aiev2-vadd-intrinsics.cpp index de559ddccfe0..bb55e57d78a3 100644 --- a/clang/test/CodeGen/aie/aie2/aiev2-vadd-intrinsics.cpp +++ b/clang/test/CodeGen/aie/aie2/aiev2-vadd-intrinsics.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang -O2 %s --target=aie2 -S -emit-llvm -o - | FileCheck %s +// RUN: %clang -O2 %s --target=aie2 -nostdlibinc -S -emit-llvm -o - | FileCheck %s // CHECK-LABEL: @_Z17test_add_v64uint8Dv64_hS_( // CHECK-NEXT: entry: diff --git a/clang/test/CodeGen/aie/aie2/bfloat16-constexpr.cpp b/clang/test/CodeGen/aie/aie2/bfloat16-constexpr.cpp index ccf7e2d801c6..29fdb787dcd3 100644 --- a/clang/test/CodeGen/aie/aie2/bfloat16-constexpr.cpp +++ b/clang/test/CodeGen/aie/aie2/bfloat16-constexpr.cpp @@ -7,7 +7,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang --target=aie2 -S -emit-llvm %s -O2 -o - | FileCheck %s +// RUN: %clang --target=aie2 -nostdlibinc -S -emit-llvm %s -O2 -o - | FileCheck %s constexpr bfloat16 Cst = -0.3761263890318252f; diff --git a/clang/test/CodeGen/aie/aie2/bfloat16.cpp b/clang/test/CodeGen/aie/aie2/bfloat16.cpp index 5e1a26a6a62f..49731245b5a3 100644 --- a/clang/test/CodeGen/aie/aie2/bfloat16.cpp +++ b/clang/test/CodeGen/aie/aie2/bfloat16.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang --target=aie2 -S -emit-llvm %s -O2 -o - | FileCheck %s +// RUN: %clang --target=aie2 -nostdlibinc -S -emit-llvm %s -O2 -o - | FileCheck %s // CHECK-LABEL: @_Z13test_bfloat16u6__bf16( // CHECK-NEXT: entry: // CHECK-NEXT: ret bfloat [[ARG:%.*]] diff --git a/clang/test/CodeGen/aie/aie2/bfloat16_cst.cpp b/clang/test/CodeGen/aie/aie2/bfloat16_cst.cpp index 9c517faa8380..d597ff6561e9 100644 --- a/clang/test/CodeGen/aie/aie2/bfloat16_cst.cpp +++ b/clang/test/CodeGen/aie/aie2/bfloat16_cst.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang --target=aie2 -S -emit-llvm %s -O2 -o - | FileCheck %s +// RUN: %clang --target=aie2 -nostdlibinc -S -emit-llvm %s -O2 -o - | FileCheck %s // CHECK: @_ZL5inits{{.*}}0xR0000{{.*}}0xR3F80{{.*}}0xRBF80{{.*}}0xR3FDA{{.*}}0xRBFDA{{.*}}0xR4124{{.*}}0xRC124{{.*}} diff --git a/clang/test/CodeGen/aie/aie2/static-local-var.cpp b/clang/test/CodeGen/aie/aie2/static-local-var.cpp index 80a811fe7468..3b46912086d4 100644 --- a/clang/test/CodeGen/aie/aie2/static-local-var.cpp +++ b/clang/test/CodeGen/aie/aie2/static-local-var.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang --target=aie2 -S -emit-llvm %s -o - | FileCheck %s +// RUN: %clang --target=aie2 -nostdlibinc -S -emit-llvm %s -o - | FileCheck %s // int f(); diff --git a/clang/test/CodeGen/aie/aie2/test-alignas.cpp b/clang/test/CodeGen/aie/aie2/test-alignas.cpp index bd250bbfefb9..222333649a53 100644 --- a/clang/test/CodeGen/aie/aie2/test-alignas.cpp +++ b/clang/test/CodeGen/aie/aie2/test-alignas.cpp @@ -8,7 +8,7 @@ // (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates // //===----------------------------------------------------------------------===// -// RUN: %clang --target=aie2 -S -emit-llvm %s -O0 -o - | FileCheck %s +// RUN: %clang --target=aie2 -nostdlibinc -S -emit-llvm %s -O0 -o - | FileCheck %s // CHECK: %struct.S1 = type { i32, [252 x i8] } struct S1 { diff --git a/clang/test/CodeGen/aie/bitint.cpp b/clang/test/CodeGen/aie/bitint.cpp index ba937d58f778..a9269d155cb5 100644 --- a/clang/test/CodeGen/aie/bitint.cpp +++ b/clang/test/CodeGen/aie/bitint.cpp @@ -9,7 +9,7 @@ // //===----------------------------------------------------------------------===// //RUN: %clang --target=aie -S -emit-llvm %s -o - | FileCheck %s -//RUN: %clang --target=aie2 -S -emit-llvm %s -o - | FileCheck %s +//RUN: %clang --target=aie2 -nostdlibinc -S -emit-llvm %s -o - | FileCheck %s // // CHECK-LABEL: @_Z12bitint2_testDU2_( // CHECK-NEXT: entry: diff --git a/clang/test/Driver/Inputs/basic_aie_tree/include/aie2-none-unknown-elf/c++/v1/.keep b/clang/test/Driver/Inputs/basic_aie_tree/include/aie2-none-unknown-elf/c++/v1/.keep new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/clang/test/Driver/Inputs/basic_aie_tree/include/c++/v1/.keep b/clang/test/Driver/Inputs/basic_aie_tree/include/c++/v1/.keep new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/clang/test/Driver/aie2/aie2-toolchain.c b/clang/test/Driver/aie2/aie2-toolchain.c index bd4cca4f8175..833a35b98c21 100644 --- a/clang/test/Driver/aie2/aie2-toolchain.c +++ b/clang/test/Driver/aie2/aie2-toolchain.c @@ -35,3 +35,7 @@ // NOSTART-SAME: "-lm" // NOSTART-NOT: "{{.*}}lib{{.*}}aie2-none-unknown-elf{{.*}}crt0.o" // NOSTART-NOT: "{{.*}}lib{{.*}}aie2-none-unknown-elf{{.*}}crt1.o" + +// RUN: %clang %s -### --target=aie2-none-unknown-elf -ccc-install-dir %S/../Inputs/basic_aie_tree/bin 2>&1 \ +// RUN: | FileCheck -check-prefix=C-INCLUDES %s +// C-INCLUDES: "-internal-externc-isystem" "{{.*}}include{{/|\\\\}}aie2-none-unknown-elf" diff --git a/clang/test/Driver/aie2/aie2-toolchain.cpp b/clang/test/Driver/aie2/aie2-toolchain.cpp new file mode 100644 index 000000000000..4a5a48b96fae --- /dev/null +++ b/clang/test/Driver/aie2/aie2-toolchain.cpp @@ -0,0 +1,16 @@ +//===- aie2-toolchain.cpp --------------------------------------*- C++ -*-===// +// +// This file is licensed under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +// (c) Copyright 2024 Advanced Micro Devices, Inc. or its affiliates +// +//===----------------------------------------------------------------------===// + + +// RUN: %clangxx %s -### --target=aie2-none-unknown-elf -ccc-install-dir %S/../Inputs/basic_aie_tree/bin 2>&1 \ +// RUN: | FileCheck -check-prefix=CXX-INCLUDES %s +// CXX-INCLUDES: "-internal-isystem" "{{.*}}include{{/|\\\\}}aie2-none-unknown-elf{{/|\\\\}}c++{{/|\\\\}}v1" +// CXX-INCLUDES: "-internal-isystem" "{{.*}}include{{/|\\\\}}c++{{/|\\\\}}v1" +// CXX-INCLUDES: "-internal-externc-isystem" "{{.*}}include{{/|\\\\}}aie2-none-unknown-elf"