Commit b9dd5f9
committed
[clang][driver] Special care for -l and -Wl, flags in config files
Currently, if a -l (or -Wl,) flag is added into a config file
(e.g. clang.cfg), it is situated before any object file in the
effective command line. If the library requested by given -l flag is
static, its symbols will not be made visible to any of the object
files provided by the user. Also, the presence of any of the linker
flags in a config file confuses the driver whenever the user invokes
clang without any parameters.
This patch attempts to solve both of the problems, by allowing a split
of the arguments list around the pipe character. The head part of the
list will be used as before, but the tail part will be appended after
the command line flags provided by the user and only when it is known
that the linking should occur.1 parent 691e556 commit b9dd5f9
File tree
6 files changed
+104
-8
lines changed- clang
- include/clang/Driver
- lib/Driver
- test/Driver
- Inputs
- flang/test/Driver
- Inputs
6 files changed
+104
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
300 | 303 | | |
301 | 304 | | |
302 | 305 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1039 | 1039 | | |
1040 | 1040 | | |
1041 | 1041 | | |
1042 | | - | |
1043 | | - | |
| 1042 | + | |
| 1043 | + | |
1044 | 1044 | | |
1045 | 1045 | | |
1046 | 1046 | | |
1047 | 1047 | | |
1048 | 1048 | | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
1049 | 1063 | | |
1050 | 1064 | | |
1051 | 1065 | | |
1052 | | - | |
1053 | | - | |
1054 | | - | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
1055 | 1073 | | |
1056 | 1074 | | |
1057 | 1075 | | |
1058 | 1076 | | |
1059 | 1077 | | |
1060 | | - | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
1061 | 1081 | | |
1062 | 1082 | | |
1063 | 1083 | | |
1064 | | - | |
| 1084 | + | |
1065 | 1085 | | |
1066 | 1086 | | |
1067 | | - | |
| 1087 | + | |
1068 | 1088 | | |
1069 | 1089 | | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
1070 | 1099 | | |
1071 | 1100 | | |
1072 | 1101 | | |
| |||
1244 | 1273 | | |
1245 | 1274 | | |
1246 | 1275 | | |
| 1276 | + | |
1247 | 1277 | | |
1248 | 1278 | | |
1249 | 1279 | | |
| |||
1540 | 1570 | | |
1541 | 1571 | | |
1542 | 1572 | | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
1543 | 1582 | | |
1544 | 1583 | | |
1545 | 1584 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
0 commit comments