brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · 68d94ca Raw
63 lines · plain
1# REQUIRES: x862# Unsupported on Windows due to maximum path length limitations.3# UNSUPPORTED: system-windows4 5# RUN: rm -rf %t.dir6# RUN: mkdir -p %t.dir/build17# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos %s -o %t.dir/build1/foo.o8# RUN: echo '_main' > %t.dir/main.exports9# RUN: echo '_main' > %t.dir/main.order10# RUN: echo 'not a virus' > %t.dir/sectdata.txt11# RUN: cd %t.dir12# RUN: %lld -platform_version macos 10.10.0 11.0 \13# RUN:     -exported_symbols_list main.exports \14# RUN:     -order_file main.order \15# RUN:     -sectcreate __COMPLETELY __legit sectdata.txt \16# RUN:     -rpath /usr/lib/swift \17# RUN:     build1/foo.o -o bar --reproduce repro1.tar18 19# RUN: tar tf repro1.tar | FileCheck -DPATH='%:t.dir' --check-prefix=LIST %s20# LIST: repro1/response.txt21# LIST: [[PATH]]/main.exports22# LIST: [[PATH]]/build1/foo.o23# LIST: [[PATH]]/main.order24# LIST: [[PATH]]/sectdata.txt25 26# RUN: tar xf repro1.tar27# RUN: cmp build1/foo.o repro1/%:t.dir/build1/foo.o28# RUN: diff main.exports repro1/%:t.dir/main.exports29# RUN: diff main.order repro1/%:t.dir/main.order30# RUN: diff sectdata.txt repro1/%:t.dir/sectdata.txt31# RUN: FileCheck %s --check-prefix=RSP1 < repro1/response.txt32# RSP1:      {{^}}-platform_version macos 10.10.0 11.0{{$}}33# RSP1-NEXT: -exported_symbols_list [[BASEDIR:.+]]/main.exports34# RSP1-NEXT: -order_file [[BASEDIR]]/main.order35# RSP1-NEXT: -sectcreate __COMPLETELY __legit [[BASEDIR]]/sectdata.txt36# RSP1-NEXT: -rpath /usr/lib/swift37# RSP1-NOT:  {{^}}repro1{{[/\\]}}38# RSP1-NEXT: [[BASEDIR]]/build1/foo.o39# RSP1-NEXT: -o bar40# RSP1-NOT:  --reproduce41 42# RUN: FileCheck %s --check-prefix=VERSION < repro1/version.txt43# VERSION: LLD44 45# RUN: cd repro1; %no-arg-lld @response.txt46 47# RUN: mkdir -p %t.dir/build2/a/b/c48# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos %s -o %t.dir/build2/foo.o49# RUN: cd %t.dir/build2/a/b/c50# RUN: echo ./../../../foo.o > %t.dir/build2/filelist51# RUN: env LLD_REPRODUCE=repro2.tar %lld -filelist %t.dir/build2/filelist -o /dev/null52# RUN: tar xf repro2.tar53# RUN: cmp %t.dir/build2/foo.o repro2/%:t.dir/build2/foo.o54# RUN: FileCheck %s --check-prefix=RSP2 < repro2/response.txt55# RSP2-NOT:  {{^}}repro2{{[/\\]}}56# RSP2:      {{[/\\]}}foo.o57 58# RUN: cd repro2; %no-arg-lld @response.txt59 60.globl _main61_main:62  ret63