Replies: 1 comment
-
Discussions are fine for this purpose. So the way this works is that I compile the source for the scripting-addition separately; there are 3 such binary files that are built so far. The The The |
Beta Was this translation helpful? Give feedback.
-
Would you prefer such a thread be an Issue or an email-chain instead? I figured a Discussion for others' discovery. I have a few questions popping up as I examine the source more thoroughly and I wanted to get some queries answered.
On line 23 of the current Makefile I see
xcrun clang $(OSAX_PATH)/loader.m -shared -O2 -mmacosx-version-min=10.13 -arch x86_64 -o $(OSAX_PATH)/loader -framework Foundation
which is compilingloader.m
into a dynamic library namedloader
.On line 26 of the current Makefile I see
xxd -i -a $(OSAX_PATH)/loader $(OSAX_PATH)/loader_bin.c
which hexdumps the contents (so effectively "it") of shared libraryloader
intoloader_bin.c
which is then compiled later on the Makefile.Is it done this way because macOS doesn't support static linking against the C runtime (when I tried I get
-lcrt0.o
errors) and so there's no other way to get theloader
statically linked toloader_bin
? That's what I gather from this where you're instead straight dumping the object code intoloader_bin.c
before it's compiled resulting in a statically linked library; but I wanted to ask to be sure!Beta Was this translation helpful? Give feedback.
All reactions