Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Side by Side Diff: test/Driver/nacl-direct.c

Issue 964923003: Include -lpthread on the link line automatically only for C++ (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-clang.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/Driver/Tools.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Test clang changes for NaCl Support including: 1 // Test clang changes for NaCl Support including:
2 // include paths, library paths, emulation, default static 2 // include paths, library paths, emulation, default static
3 // 3 //
4 // RUN: %clang -### -o %t.o %s 2>&1 \ 4 // RUN: %clang -### -o %t.o %s 2>&1 \
5 // RUN: -target i686-unknown-nacl \ 5 // RUN: -target i686-unknown-nacl \
6 // RUN: | FileCheck --check-prefix=CHECK-I686 %s 6 // RUN: | FileCheck --check-prefix=CHECK-I686 %s
7 // CHECK-I686: {{.*}}clang{{.*}}" "-cc1" 7 // CHECK-I686: {{.*}}clang{{.*}}" "-cc1"
8 // CHECK-I686: "-fuse-init-array" 8 // CHECK-I686: "-fuse-init-array"
9 // CHECK-I686: "-target-cpu" "pentium4" 9 // CHECK-I686: "-target-cpu" "pentium4"
10 // CHECK-I686: "-resource-dir" "{{.*}}/lib/clang/[[VER:[0-9.]+]]" 10 // CHECK-I686: "-resource-dir" "{{.*}}/lib/clang/[[VER:[0-9.]+]]"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // RUN: -target armv7a-unknown-nacl-gnueabihf \ 43 // RUN: -target armv7a-unknown-nacl-gnueabihf \
44 // RUN: | FileCheck --check-prefix=CHECK-ARM %s 44 // RUN: | FileCheck --check-prefix=CHECK-ARM %s
45 // CHECK-ARM: {{.*}}clang{{.*}}" "-cc1" 45 // CHECK-ARM: {{.*}}clang{{.*}}" "-cc1"
46 // CHECK-ARM: "-fuse-init-array" 46 // CHECK-ARM: "-fuse-init-array"
47 // CHECK-ARM: "-target-cpu" "cortex-a8" 47 // CHECK-ARM: "-target-cpu" "cortex-a8"
48 // CHECK-ARM: "-target-abi" "aapcs-linux" 48 // CHECK-ARM: "-target-abi" "aapcs-linux"
49 // CHECK-ARM: "-mfloat-abi" "hard" 49 // CHECK-ARM: "-mfloat-abi" "hard"
50 // CHECK-ARM: "-resource-dir" "{{.*}}/lib/clang/[[VER:[0-9.]+]]" 50 // CHECK-ARM: "-resource-dir" "{{.*}}/lib/clang/[[VER:[0-9.]+]]"
51 // CHECK-ARM: "-internal-isystem" "{{.*}}/../lib/clang/[[VER]]/include" 51 // CHECK-ARM: "-internal-isystem" "{{.*}}/../lib/clang/[[VER]]/include"
52 // CHECK-ARM: "-internal-isystem" "{{.*}}/../arm-nacl/usr/include" 52 // CHECK-ARM: "-internal-isystem" "{{.*}}/../arm-nacl/usr/include"
53 // CHECK-ARM: "-internal-isystem" "{{.*}}/../arm-nacl/include" 53 // CHECK-ARM: "-internal-isystem" "{{.*}}/../arm-nacl/include"
jvoung (off chromium) 2015/03/04 17:20:09 could CHECK-ARM-NOT: "-lpthread", etc.
Derek Schuff 2015/03/04 17:39:35 Done.
54 // CHECK-ARM: /as" 54 // CHECK-ARM: /as"
55 // CHECK-ARM: /ld" 55 // CHECK-ARM: /ld"
56 // CHECK-ARM: "--build-id" 56 // CHECK-ARM: "--build-id"
57 // CHECK-ARM: "-m" "armelf_nacl" 57 // CHECK-ARM: "-m" "armelf_nacl"
58 // CHECK-ARM: "-static" 58 // CHECK-ARM: "-static"
59 // CHECK-ARM: "-L{{.*}}/../arm-nacl/lib" 59 // CHECK-ARM: "-L{{.*}}/../arm-nacl/lib"
60 // CHECK-ARM: "-L{{.*}}/../arm-nacl/usr/lib" 60 // CHECK-ARM: "-L{{.*}}/../arm-nacl/usr/lib"
61 // CHECK-ARM: "-L{{.*}}/../lib/clang/[[VER]]/lib/arm-nacl" 61 // CHECK-ARM: "-L{{.*}}/../lib/clang/[[VER]]/lib/arm-nacl"
62 62
63 // Check that even when the target arch is just "arm" (as will be the case when 63 // Check that even when the target arch is just "arm" (as will be the case when
64 // it is inferred from the binary name) that we get the right ABI flags 64 // it is inferred from the binary name) that we get the right ABI flags
65 // RUN: %clang -### -o %t.o %s 2>&1 \ 65 // RUN: %clang -### -o %t.o %s 2>&1 \
66 // RUN: -target arm-nacl \ 66 // RUN: -target arm-nacl \
67 // RUN: | FileCheck --check-prefix=CHECK-ARM-NOV7 %s 67 // RUN: | FileCheck --check-prefix=CHECK-ARM-NOV7 %s
68 // CHECK-ARM-NOV7: "-triple" "armv7--nacl-gnueabihf" 68 // CHECK-ARM-NOV7: "-triple" "armv7--nacl-gnueabihf"
69 // CHECK-ARM-NOV7: "-target-abi" "aapcs-linux" 69 // CHECK-ARM-NOV7: "-target-abi" "aapcs-linux"
70 // CHECK-ARM-NOV7: "-mfloat-abi" "hard" 70 // CHECK-ARM-NOV7: "-mfloat-abi" "hard"
71 71
72 // Check C++ include directories 72 // Test clang c++ include dirs and link line when using clang++
73 73
74 // RUN: %clang -x c++ -### -o %t.o %s 2>&1 \ 74 // RUN: %clangxx -### -o %t.o %s 2>&1 \
75 // RUN: -target armv7a-unknown-nacl-gnueabihf \ 75 // RUN: -target armv7a-unknown-nacl-gnueabihf \
76 // RUN: | FileCheck --check-prefix=CHECK-ARM-CXX %s 76 // RUN: | FileCheck --check-prefix=CHECK-ARM-CXX %s
77 // CHECK-ARM-CXX: {{.*}}clang{{.*}}" "-cc1" 77 // CHECK-ARM-CXX: {{.*}}clang{{.*}}" "-cc1"
78 // CHECK-ARM-CXX: "-resource-dir" "{{.*}}/lib/clang/[[VER:[0-9.]+]]" 78 // CHECK-ARM-CXX: "-resource-dir" "{{.*}}/lib/clang/[[VER:[0-9.]+]]"
79 // CHECK-ARM-CXX: "-internal-isystem" "{{.*}}/../arm-nacl/include/c++/v1" 79 // CHECK-ARM-CXX: "-internal-isystem" "{{.*}}/../arm-nacl/include/c++/v1"
80 // CHECK-ARM-CXX: "-internal-isystem" "{{.*}}/../lib/clang/[[VER]]/include" 80 // CHECK-ARM-CXX: "-internal-isystem" "{{.*}}/../lib/clang/[[VER]]/include"
81 // CHECK-ARM-CXX: "-internal-isystem" "{{.*}}/../arm-nacl/usr/include" 81 // CHECK-ARM-CXX: "-internal-isystem" "{{.*}}/../arm-nacl/usr/include"
82 // CHECK-ARM-CXX: "-internal-isystem" "{{.*}}/../arm-nacl/include" 82 // CHECK-ARM-CXX: "-internal-isystem" "{{.*}}/../arm-nacl/include"
83 // CHECK-ARM-CXX: "-lpthread" 83 // CHECK-ARM-CXX: "-lpthread"
84 84
85 // RUN: %clang -x c++ -### -o %t.o %s 2>&1 \ 85 // RUN: %clangxx -### -o %t.o %s 2>&1 \
86 // RUN: -target i686-unknown-nacl \ 86 // RUN: -target i686-unknown-nacl \
87 // RUN: | FileCheck --check-prefix=CHECK-I686-CXX %s 87 // RUN: | FileCheck --check-prefix=CHECK-I686-CXX %s
88 // CHECK-I686-CXX: {{.*}}clang{{.*}}" "-cc1" 88 // CHECK-I686-CXX: {{.*}}clang{{.*}}" "-cc1"
89 // CHECK-I686-CXX: "-resource-dir" "{{.*}}/lib/clang/[[VER:[0-9.]+]]" 89 // CHECK-I686-CXX: "-resource-dir" "{{.*}}/lib/clang/[[VER:[0-9.]+]]"
90 // CHECK-I686-CXX: "-internal-isystem" "{{.*}}/../x86_64-nacl/include/c++/v1" 90 // CHECK-I686-CXX: "-internal-isystem" "{{.*}}/../x86_64-nacl/include/c++/v1"
91 // CHECK-I686-CXX: "-internal-isystem" "{{.*}}/../lib/clang/[[VER]]/include" 91 // CHECK-I686-CXX: "-internal-isystem" "{{.*}}/../lib/clang/[[VER]]/include"
92 // CHECK-I686-CXX: "-internal-isystem" "{{.*}}/../x86_64-nacl/usr/include" 92 // CHECK-I686-CXX: "-internal-isystem" "{{.*}}/../x86_64-nacl/usr/include"
93 // CHECK-I686-CXX: "-internal-isystem" "{{.*}}/../x86_64-nacl/include" 93 // CHECK-I686-CXX: "-internal-isystem" "{{.*}}/../x86_64-nacl/include"
94 // CHECK-I686-CXX: "-lpthread" 94 // CHECK-I686-CXX: "-lpthread"
95 95
96 // 96 // RUN: %clangxx -### -o %t.o %s 2>&1 \
97 // RUN: %clang -x c++ -### -o %t.o %s 2>&1 \
98 // RUN: -target x86_64-unknown-nacl \ 97 // RUN: -target x86_64-unknown-nacl \
99 // RUN: | FileCheck --check-prefix=CHECK-x86_64-CXX %s 98 // RUN: | FileCheck --check-prefix=CHECK-x86_64-CXX %s
100 // CHECK-x86_64-CXX: {{.*}}clang{{.*}}" "-cc1" 99 // CHECK-x86_64-CXX: {{.*}}clang{{.*}}" "-cc1"
101 // CHECK-x86_64-CXX: "-resource-dir" "{{.*}}/lib/clang/[[VER:[0-9.]+]]" 100 // CHECK-x86_64-CXX: "-resource-dir" "{{.*}}/lib/clang/[[VER:[0-9.]+]]"
102 // CHECK-x86_64-CXX: "-internal-isystem" "{{.*}}/../x86_64-nacl/include/c++/v1" 101 // CHECK-x86_64-CXX: "-internal-isystem" "{{.*}}/../x86_64-nacl/include/c++/v1"
103 // CHECK-x86_64-CXX: "-internal-isystem" "{{.*}}/../lib/clang/[[VER]]/include" 102 // CHECK-x86_64-CXX: "-internal-isystem" "{{.*}}/../lib/clang/[[VER]]/include"
104 // CHECK-x86_64-CXX: "-internal-isystem" "{{.*}}/../x86_64-nacl/usr/include" 103 // CHECK-x86_64-CXX: "-internal-isystem" "{{.*}}/../x86_64-nacl/usr/include"
105 // CHECK-x86_64-CXX: "-internal-isystem" "{{.*}}/../x86_64-nacl/include" 104 // CHECK-x86_64-CXX: "-internal-isystem" "{{.*}}/../x86_64-nacl/include"
106 // CHECK-x86_64-CXX: "-lpthread" 105 // CHECK-x86_64-CXX: "-lpthread"
OLDNEW
« no previous file with comments | « lib/Driver/Tools.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698