@@ -18,7 +18,6 @@ pub const Config = struct {
18
18
has_side_effects : bool ,
19
19
enable_tracy : bool ,
20
20
use_llvm : bool ,
21
- force_pic : bool ,
22
21
error_tracing : ? bool ,
23
22
long_tests : bool ,
24
23
version : std.SemanticVersion ,
@@ -95,11 +94,6 @@ pub const Config = struct {
95
94
"use-llvm" ,
96
95
"If disabled, uses experimental self-hosted backend. Only works for x86_64-linux" ,
97
96
) orelse true ,
98
- .force_pic = b .option (
99
- bool ,
100
- "force_pic" ,
101
- "Builds linked dependencies with PIC enabled. If false, builds default PIC mode." ,
102
- ) orelse false ,
103
97
.error_tracing = b .option (
104
98
bool ,
105
99
"error-tracing" ,
@@ -223,39 +217,31 @@ pub fn build(b: *Build) !void {
223
217
const lsquic_dep = b .dependency ("lsquic" , .{
224
218
.target = config .target ,
225
219
.optimize = config .optimize ,
226
- // TSan needs a PIE executable, so we need to build the deps with PIC.
227
- .force_pic = config .force_pic or config .enable_tsan ,
228
220
});
229
221
const lsquic_mod = lsquic_dep .module ("lsquic" );
230
222
231
223
const zstd_mod = b .dependency ("zstd" , .{
232
224
.target = config .target ,
233
225
.optimize = config .optimize ,
234
- .force_pic = config .force_pic or config .enable_tsan ,
235
226
}).module ("zstd" );
236
227
237
228
const ssl_mod = lsquic_dep .builder .dependency ("boringssl" , .{
238
229
.target = config .target ,
239
230
.optimize = config .optimize ,
240
- .force_pic = config .force_pic or config .enable_tsan ,
241
231
}).module ("ssl" );
242
232
243
233
const rocksdb_dep = b .dependency ("rocksdb" , .{
244
234
.target = config .target ,
245
235
.optimize = config .optimize ,
246
- .force_pic = config .force_pic or config .enable_tsan ,
247
236
});
248
237
const rocksdb_mod = rocksdb_dep .module ("bindings" );
249
238
// TODO: UB might be fixed by future RocksDB version upgrade.
250
239
// reproducable via: zig build test -Dfilter="ledger"
251
240
rocksdb_dep .artifact ("rocksdb" ).root_module .sanitize_c = false ;
252
241
253
- // the sig-fuzz target needs to be built as a shared library, which requires
254
- // the linked dependencies of sig to have been built with PIC.
255
242
const secp256k1_mod = b .dependency ("secp256k1" , .{
256
243
.target = config .target ,
257
244
.optimize = config .optimize ,
258
- .force_pic = config .force_pic or config .enable_tsan ,
259
245
}).module ("secp256k1" );
260
246
261
247
const tracy_mod = b .dependency ("tracy" , .{
0 commit comments