[PATCH] D91891: [lld-macho] Don't warn on non-existent system libraries

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 20 17:40:00 PST 2020


thakis added inline comments.


================
Comment at: lld/test/MachO/syslibroot.test:31
-CHECK-SYSLIBROOT-IGNORED: /usr/lib
-CHECK-SYSLIBROOT-IGNORED: /usr/local/lib
-
----------------
smeenai wrote:
> thakis wrote:
> > This patch is also fixing this test ffailing on one of my macs, in a fairly normal setup (commandline tools installed, xcode not installed, m1).
> I don't quite understand this. A final syslibroot of just `/` is supposed to ignore any previously specified roots (a hack which we inherit from ld64), and I believe that's what this test was for. I don't see how your code change affects this test?
Without my patch, the output of the command under test is (on my linux box):

```
$ out/gn/bin/lld -flavor darwinnew -v -syslibroot /var/empty -syslibroot /
lld: warning: directory not found for option -F/Library/Frameworks
lld: warning: directory not found for option -F/System/Library/Frameworks
LLD 12.0.0
Library search paths:
	/usr/lib
	/usr/local/lib
Framework search paths:
```

After my change, it is just:

```
$ out/gn/bin/lld -flavor darwinnew -v -syslibroot /var/empty -syslibroot /
LLD 12.0.0
Library search paths:
	/usr/lib
	/usr/local/lib
Framework search paths:
```

Previously, the "/usr/local/lib" in the CHECK-SYSLIBROOT-IGNORED line matched against the "warning: directory not found" line, but now that the warning is gone the test fails instead. I don't know if it was supposed to match against that warning line (the "mach here is fuzzy" comment isn't quite clear to me), but after this change it can't match the warning line any longer.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91891/new/

https://reviews.llvm.org/D91891



More information about the llvm-commits mailing list