2015-09-18 03:56:40 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes -### -target sparc-myriad-rtems-elf %s \
|
|
|
|
// RUN: -B %S/Inputs/basic_myriad_tree 2>&1 | FileCheck %s -check-prefix=LINK_WITH_RTEMS
|
|
|
|
// LINK_WITH_RTEMS: Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-elf/4.8.2/crti.o
|
|
|
|
// LINK_WITH_RTEMS: Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-elf/4.8.2/crtbegin.o
|
2015-09-18 09:02:50 +08:00
|
|
|
// LINK_WITH_RTEMS: "-L{{.*}}Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-elf/4.8.2/../../..{{/|\\\\}}../sparc-myriad-elf/lib"
|
2015-09-18 03:56:40 +08:00
|
|
|
// LINK_WITH_RTEMS: "-L{{.*}}Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-elf/4.8.2"
|
|
|
|
// LINK_WITH_RTEMS: "--start-group" "-lc" "-lrtemscpu" "-lrtemsbsp" "--end-group" "-lgcc"
|
|
|
|
// LINK_WITH_RTEMS: Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-elf/4.8.2/crtend.o
|
|
|
|
// LINK_WITH_RTEMS: Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-elf/4.8.2/crtn.o
|
|
|
|
|
2015-10-17 02:46:26 +08:00
|
|
|
// RUN: %clang -c -no-canonical-prefixes -### -target sparc-myriad-rtems-elf -x c++ %s \
|
|
|
|
// RUN: -B %S/Inputs/basic_myriad_tree 2>&1 | FileCheck %s -check-prefix=COMPILE_CXX
|
|
|
|
// COMPILE_CXX: "-internal-isystem" "{{.*}}/Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-elf/4.8.2/../../../../sparc-myriad-elf/include/c++/4.8.2"
|
|
|
|
// COMPILE_CXX: "-internal-isystem" "{{.*}}/Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-elf/4.8.2/../../../../sparc-myriad-elf/include/c++/4.8.2/sparc-myriad-elf"
|
|
|
|
// COMPILE_CXX: "-internal-isystem" "{{.*}}/Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-elf/4.8.2/../../../../sparc-myriad-elf/include/c++/4.8.2/backward"
|
|
|
|
|
2015-09-18 05:20:16 +08:00
|
|
|
// RUN: %clang -### -E -target sparc-myriad --sysroot=/yow %s 2>&1 \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=SLASH_INCLUDE
|
|
|
|
// SLASH_INCLUDE: "-isysroot" "/yow" "-internal-isystem" "/yow/include"
|
|
|
|
|
|
|
|
// RUN: %clang -### -E -target sparc-myriad --sysroot=/yow %s -nostdinc 2>&1 \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=NO_SLASH_INCLUDE
|
|
|
|
// NO_SLASH_INCLUDE: "-isysroot" "/yow"
|
|
|
|
// NO_SLASH_INCLUDE-NOT: "-internal-isystem" "/yow/include"
|
|
|
|
|
2015-09-18 03:56:40 +08:00
|
|
|
// RUN: %clang -### -target what-myriad %s 2>&1 | FileCheck %s -check-prefix=BAD_ARCH
|
|
|
|
// BAD_ARCH: the target architecture 'what' is not supported by the target 'myriad'
|
|
|
|
|
2015-06-19 22:55:19 +08:00
|
|
|
// Ensure that '-target shave' picks a different compiler.
|
|
|
|
// Also check that '-I' is turned into '-i:' for the assembler.
|
|
|
|
|
|
|
|
// Note that since we don't know where movi tools are installed,
|
|
|
|
// the driver may or may not find a full path to them.
|
|
|
|
// That is, the 0th argument will be "/path/to/my/moviCompile"
|
|
|
|
// or just "moviCompile" depending on whether moviCompile is found.
|
|
|
|
// As such, we test only for a trailing quote in its rendering.
|
|
|
|
// The same goes for "moviAsm".
|
|
|
|
|
2015-09-18 03:56:40 +08:00
|
|
|
// RUN: %clang -target shave-myriad -c -### %s -isystem somewhere -Icommon -Wa,-yippee 2>&1 \
|
2015-08-05 23:08:54 +08:00
|
|
|
// RUN: | FileCheck %s -check-prefix=MOVICOMPILE
|
2015-09-12 05:13:46 +08:00
|
|
|
// MOVICOMPILE: moviCompile" "-DMYRIAD2" "-mcpu=myriad2" "-S" "-isystem" "somewhere" "-I" "common"
|
|
|
|
// MOVICOMPILE: moviAsm" "-no6thSlotCompression" "-cv:myriad2" "-noSPrefixing" "-a"
|
|
|
|
// MOVICOMPILE: "-yippee" "-i:somewhere" "-i:common" "-elf"
|
2015-06-19 22:55:19 +08:00
|
|
|
|
2015-09-18 03:56:40 +08:00
|
|
|
// RUN: %clang -target shave-myriad -c -### %s -DEFINE_ME -UNDEFINE_ME 2>&1 \
|
2015-08-05 23:08:54 +08:00
|
|
|
// RUN: | FileCheck %s -check-prefix=DEFINES
|
|
|
|
// DEFINES: "-D" "EFINE_ME" "-U" "NDEFINE_ME"
|
2015-06-19 22:55:19 +08:00
|
|
|
|
2015-09-18 03:56:40 +08:00
|
|
|
// RUN: %clang -target shave-myriad -c -### %s -Icommon -iquote quotepath -isystem syspath 2>&1 \
|
2015-08-05 23:08:54 +08:00
|
|
|
// RUN: | FileCheck %s -check-prefix=INCLUDES
|
|
|
|
// INCLUDES: "-iquote" "quotepath" "-isystem" "syspath"
|
2015-08-03 22:34:22 +08:00
|
|
|
|
2015-09-18 03:56:40 +08:00
|
|
|
// RUN: %clang -target shave-myriad -c -### %s -g -fno-inline-functions \
|
2015-09-02 21:42:43 +08:00
|
|
|
// RUN: -fno-inline-functions-called-once -Os -Wall -MF dep.d \
|
|
|
|
// RUN: -ffunction-sections 2>&1 | FileCheck %s -check-prefix=PASSTHRU_OPTIONS
|
|
|
|
// PASSTHRU_OPTIONS: "-g" "-fno-inline-functions" "-fno-inline-functions-called-once"
|
|
|
|
// PASSTHRU_OPTIONS: "-Os" "-Wall" "-MF" "dep.d" "-ffunction-sections"
|
2015-09-09 03:29:55 +08:00
|
|
|
|
2015-09-18 03:56:40 +08:00
|
|
|
// RUN: %clang -target shave-myriad -c %s -o foo.o -### -MD -MF dep.d 2>&1 \
|
2015-09-09 03:29:55 +08:00
|
|
|
// RUN: | FileCheck %s -check-prefix=MDMF
|
|
|
|
// MDMF: "-S" "-MD" "-MF" "dep.d" "-MT" "foo.o"
|
2015-10-03 02:39:08 +08:00
|
|
|
|
2015-11-16 23:38:40 +08:00
|
|
|
// RUN: %clang -target shave-myriad -std=gnu++11 -S %s -o foo.o -### 2>&1 \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=STDEQ
|
|
|
|
// STDEQ: "-mcpu=myriad2" "-S" "-std=gnu++11"
|
|
|
|
|
2015-10-10 04:26:20 +08:00
|
|
|
// RUN: %clang -target sparc-myriad -### --driver-mode=g++ %s 2>&1 | FileCheck %s --check-prefix=STDLIBCXX
|
|
|
|
// STDLIBCXX: "-lstdc++" "-lc" "-lgcc"
|
|
|
|
|
2015-10-03 02:39:08 +08:00
|
|
|
// RUN: %clang -target sparc-myriad -### -nostdlib %s 2>&1 | FileCheck %s --check-prefix=NOSTDLIB
|
2015-11-18 06:33:34 +08:00
|
|
|
// NOSTDLIB-NOT: crtbegin.o
|
2015-10-03 02:39:08 +08:00
|
|
|
// NOSTDLIB-NOT: "-lc"
|
2015-10-08 22:18:02 +08:00
|
|
|
|
|
|
|
// RUN: %clang -### -c -g %s -target sparc-myriad 2>&1 | FileCheck -check-prefix=G_SPARC %s
|
|
|
|
// G_SPARC: "-debug-info-kind=limited" "-dwarf-version=2"
|