[PATCH] D22943: [Driver] Add FIXME's where we can't use effective triples (NFC)

Vedant Kumar via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 1 08:50:59 PDT 2016

> On Jul 30, 2016, at 12:59 PM, Joerg Sonnenberger via cfe-commits <cfe-commits at lists.llvm.org> wrote:
> On Thu, Jul 28, 2016 at 10:11:05PM +0000, Vedant Kumar wrote:
>>  - test/Driver/netbsd.c
>>    We see -mcpu=arm1022e instead of arm926ej-s in a single run.
> Which one exactly?

Here is the test (test/Driver/netbsd.c @ Line 175):

> // ARM: clang{{.*}}" "-cc1" "-triple" "armv5e--netbsd-eabi"
> // ARM: as{{.*}}" "-mcpu=arm926ej-s" "-o"
> // ARM: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
> // ARM: "-m" "armelf_nbsd_eabi"
> // ARM: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
> // ARM: "{{.*}}/usr/lib{{/|\\\\}}eabi{{/|\\\\}}crti.o"
> // ARM: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
> // ARM: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"

And here is the test output:

> /Users/vk/Desktop/llvm/tools/clang/test/Driver/netbsd.c:175:9: error: expected string not found in input
> // ARM: as{{.*}}" "-mcpu=arm926ej-s" "-o"
>         ^
> <stdin>:5:81: note: scanning from here
>  "/Users/vk/Desktop/llvm/DA/./bin/clang" "-cc1" "-triple" "armv5e--netbsd-eabi" "-S" "-disable-free" "-main-file-name" "netbsd.c" "-mrelocation-model" "static" "-mthread-model" "posix" "-mdisable-fp-elim" "-masm-verbose" "-no-integrated-as" "-mconstructor-aliases" "-munwind-tables" "-target-cpu" "arm1022e" "-target-feature" "+soft-float-abi" "-target-feature" "+strict-align" "-target-abi" "aapcs" "-mfloat-abi" "soft" "-target-linker-version" "272" "-dwarf-column-info" "-debugger-tuning=gdb" "-resource-dir" "/Users/vk/Desktop/llvm/DA/./bin/../lib/clang/4.0.0" "-isysroot" "/Users/vk/Desktop/llvm/tools/clang/test/Driver/Inputs/basic_netbsd_tree" "-fno-dwarf-directory-asm" "-fdebug-compilation-dir" "/Users/vk/Desktop/llvm/build/tools/clang/test/Driver" "-ferror-limit" "19" "-fmessage-length" "0" "-fallow-half-arguments-and-returns" "-fno-signed-char" "-fobjc-runtime=gnustep" "-fdiagnostics-show-option" "-o" "/var/folders/j5/4k_dcg5j5kl7z4fd3gp1pjp40000gn/T/netbsd-0d4ff3.s" "-x" "c" "/Users/vk/Desktop/llvm/tools/clang/test/Driver/netbsd.c"
>                                                                                 ^
> <stdin>:6:6: note: possible intended match here
>  "/usr/bin/as" "-mcpu=arm1022e" "-o" "/var/folders/j5/4k_dcg5j5kl7z4fd3gp1pjp40000gn/T/netbsd-82d94c.o" "/var/folders/j5/4k_dcg5j5kl7z4fd3gp1pjp40000gn/T/netbsd-0d4ff3.s"

For context, the inconsistency arises when the driver uses
ToolChain::ComputeLLVMTriple() instead of the default toolchain triple.

Thanks for taking a look!


More information about the cfe-commits mailing list