2017-10-13 02:10:22 +08:00
|
|
|
; If the binary looks up libraries using an rpath, we can't test this
|
|
|
|
; without copying the whole lib dir or polluting the build dir.
|
2017-10-13 08:17:54 +08:00
|
|
|
; REQUIRES: static-libs
|
2017-10-12 12:35:32 +08:00
|
|
|
; REQUIRES: aarch64-registered-target
|
|
|
|
|
[lit][tests]Add feature libcxx-used and use it in llvm-*-fuzzer tests
When a LLVM binary such as llvm-*-fuzzer is built with libc++, it has dependency on libc++. The path to find shared libraries specified in llvm-*-fuzzer is relative. As a result, these binaries cannot be copied to an arbitrary directory and launched from there. Changes in this patch add a LIT feature to indicate that libc++ is used to build and, based on the feature exclude test cases that test by copying llvm-*-fuzzer binaries to a directory.
Reviewers: hubert.reinterpretcast, dberris, amyk, jasonliu, EricWF
Reviewed By: hubert.reinterpretcast, amyk
Subscribers: javed.absar, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61265
llvm-svn: 360672
2019-05-14 21:54:33 +08:00
|
|
|
; The above also applies if the binary is built with libc++.
|
|
|
|
; UNSUPPORTED: libcxx-used
|
|
|
|
|
2017-10-12 12:35:32 +08:00
|
|
|
; RUN: echo > %t.input
|
|
|
|
|
2017-10-13 08:18:32 +08:00
|
|
|
; RUN: cp llvm-isel-fuzzer %t.bin--aarch64
|
|
|
|
; RUN: %t.bin--aarch64 %t.input 2>&1 | FileCheck -check-prefix=AARCH64 %s
|
2017-10-12 12:35:32 +08:00
|
|
|
; AARCH64: Injected args: -mtriple=aarch64
|
|
|
|
|
2017-10-13 08:18:32 +08:00
|
|
|
; RUN: cp llvm-isel-fuzzer %t.bin--aarch64-O1
|
|
|
|
; RUN: %t.bin--aarch64-O1 %t.input 2>&1 | FileCheck -check-prefix=OPT-AFTER %s
|
2017-10-12 12:35:32 +08:00
|
|
|
; OPT-AFTER: Injected args: -mtriple=aarch64 -O1
|
|
|
|
|
2017-10-13 08:18:32 +08:00
|
|
|
; RUN: cp llvm-isel-fuzzer %t.bin--O3-aarch64
|
|
|
|
; RUN: %t.bin--O3-aarch64 %t.input 2>&1 | FileCheck -check-prefix=OPT-BEFORE %s
|
2017-10-12 12:35:32 +08:00
|
|
|
; OPT-BEFORE: Injected args: -O3 -mtriple=aarch64
|