Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAllow linking against libSystem on macOS for testing of Mach-O executables #6155
Conversation
This is required since an exec on macOS always has to link against libSystem.dylib. Signed-off-by: Jakub Konka <kubkon@jakubkonka.com>
This is required when generating an exe on macOS. Signed-off-by: Jakub Konka <kubkon@jakubkonka.com>
139beff
to
a85ba9e
Signed-off-by: Jakub Konka <kubkon@jakubkonka.com>
|
Status quo in stage1 is that we always link dynamically against libSystem when targeting macOS, no exceptions. This has been working well, and I don't see a reason to make it optional. Hopefully that can simplify your task here |
Awesome, thanks @andrewrk! It's not a biggie ATM, but it's definitely good to know, so thanks for the heads up! |
Ultimately, this will be up to the user to specify they want to link against
libSystemon macOS when generating executables/dynamic libraries; however, since we don't propagate-lflags from main yet, baking in linkage tolibSystemin Mach-O is currently behind a Mach-O property that can be enabled for all generated executables. As far as I can tell, since approximately Mountain Lion, every executable running on macOS is required to link againstlibSystem. Here's a link to discussion about this in LLVM.