File tree 1 file changed +9
-0
lines changed 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -372,6 +372,10 @@ pub const Builder = struct {
372
372
.abi = builtin .abi ,
373
373
}).linuxTriple (self .allocator );
374
374
375
+ // TODO: $ ld --verbose | grep SEARCH_DIR
376
+ // the output contains some paths that end with lib64, maybe include them too?
377
+ // also, what is the best possible order of things?
378
+
375
379
self .addNativeSystemIncludeDir ("/usr/local/include" );
376
380
self .addNativeSystemLibPath ("/usr/local/lib" );
377
381
@@ -380,6 +384,11 @@ pub const Builder = struct {
380
384
381
385
self .addNativeSystemIncludeDir ("/usr/include" );
382
386
self .addNativeSystemLibPath ("/usr/lib" );
387
+
388
+ // example: on a 64-bit debian-based linux distro, with zlib installed from apt:
389
+ // zlib.h is in /usr/include (added above)
390
+ // libz.so.1 is in /lib/x86_64-linux-gnu (added here)
391
+ self .addNativeSystemLibPath (self .fmt ("/lib/{}" , triple ));
383
392
},
384
393
}
385
394
}
You can’t perform that action at this time.
0 commit comments