Open MaskRay opened 1 year ago
Issue1: Ok, feel free to send a PR.
Issue2: (-emit-obj) I find it confusing. We already have -cc1
and -o
to output an object. I don't think we need to make it more explicit.
Issue3: Not sure what you are referring to. Please specify the .php
location/
Consider the more conventional order:
clang -v -std=c89 hello.c -lm
(For libm.so, it's fine to keep -lm anywhere, but for static linking, libm.a needs to be placed the last to appease GNU ld, gold, and ld.lld --warn-backrefs)
ld will receive foo bar hello.o since the positions of linker options and input files matter.
Make the cc1 action
-emit-obj
explicit here and throughout (including other articles like cc.php)?clang -cc1 -emit-obj hello.c -o hello.o
The default action is
-fsyntax-only
and-emit-obj
is an important detail to keep.Use
gcc -c foo.h -o foo.gch
?