Commit b06f495
Fixes incorrect install names on darwin platforms
#12304 added support to bazel for setting install names for dynamic
libraries on darwin platforms. This would set LC_ID_DYLIB to
@rpath/{library_name}, so that RPATH would be used to locate these
libraries at runtime. However, the code was using a utility method that
assumed the library name was mangled, which is often not the case. Given
that the output path should already have been determined with the
mangled or unmangled name, we should be able to just use the base name
of the artifact. The test that was added in #12304 has been updated to
actually use dynamic libaries, and passes with the changes made in this
commit.
Closes #13427.
PiperOrigin-RevId: 3775040151 parent cf8ec29 commit b06f495
2 files changed
Lines changed: 35 additions & 18 deletions
File tree
- src
- main/java/com/google/devtools/build/lib/rules/cpp
- test/shell/bazel
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
872 | 872 | | |
873 | 873 | | |
874 | 874 | | |
875 | | - | |
876 | | - | |
| 875 | + | |
877 | 876 | | |
878 | 877 | | |
879 | 878 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
128 | | - | |
| 127 | + | |
| 128 | + | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
133 | 142 | | |
134 | 143 | | |
135 | 144 | | |
136 | | - | |
| 145 | + | |
137 | 146 | | |
138 | 147 | | |
139 | 148 | | |
140 | | - | |
141 | | - | |
| 149 | + | |
| 150 | + | |
142 | 151 | | |
143 | | - | |
144 | | - | |
| 152 | + | |
| 153 | + | |
145 | 154 | | |
146 | | - | |
147 | | - | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
148 | 162 | | |
149 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
150 | 169 | | |
151 | 170 | | |
152 | 171 | | |
153 | | - | |
154 | | - | |
| 172 | + | |
| 173 | + | |
155 | 174 | | |
156 | | - | |
| 175 | + | |
157 | 176 | | |
158 | 177 | | |
159 | | - | |
| 178 | + | |
160 | 179 | | |
161 | 180 | | |
162 | 181 | | |
163 | 182 | | |
164 | | - | |
| |||
0 commit comments