I have set up my IceTea tool to also build through XCode. This is merely an excercise to find my way around in the IDE itself by using code that I already wrote. On pure command line, everything works exactly as expected. But with XCode, incbin no longer emits files. I even copied the compiled binary and compared them, and saw that they were pretty different.
Here is an extract of what XCode does:
CompileC build/IceTea.build/Release/incbin.build/Objects-normal/x86_64/incbin.o /Users/Ingwie/Work/IceTea/deps/incbin/incbin.c normal x86_64 c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/Ingwie/Work/IceTea/ide
export LANG=en_US.US-ASCII
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c -arch x86_64 -fmessage-length=204 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fcolor-diagnostics -std=gnu99 -fmodules -gmodules -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/var/folders/kz/l3s2fpd51ln9_p9ymvqbyshm0000gn/C/org.llvm.clang/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -Os -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Wunreachable-code -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -mmacosx-version-min=10.11 -g -fvisibility=hidden -Wno-sign-conversion -iquote /Users/Ingwie/Work/IceTea/ide/build/IceTea.build/Release/incbin.build/incbin-generated-files.hmap -I/Users/Ingwie/Work/IceTea/ide/build/IceTea.build/Release/incbin.build/incbin-own-target-headers.hmap -I/Users/Ingwie/Work/IceTea/ide/build/IceTea.build/Release/incbin.build/incbin-all-target-headers.hmap -iquote /Users/Ingwie/Work/IceTea/ide/build/IceTea.build/Release/incbin.build/incbin-project-headers.hmap -I/Users/Ingwie/Work/IceTea/ide/build/Release/include -I/Users/Ingwie/Work/IceTea/ide/build/IceTea.build/Release/incbin.build/DerivedSources/x86_64 -I/Users/Ingwie/Work/IceTea/ide/build/IceTea.build/Release/incbin.build/DerivedSources -F/Users/Ingwie/Work/IceTea/ide/build/Release -MMD -MT dependencies -MF /Users/Ingwie/Work/IceTea/ide/build/IceTea.build/Release/incbin.build/Objects-normal/x86_64/incbin.d --serialize-diagnostics /Users/Ingwie/Work/IceTea/ide/build/IceTea.build/Release/incbin.build/Objects-normal/x86_64/incbin.dia -c /Users/Ingwie/Work/IceTea/deps/incbin/incbin.c -o /Users/Ingwie/Work/IceTea/ide/build/IceTea.build/Release/incbin.build/Objects-normal/x86_64/incbin.o
/Users/Ingwie/Work/IceTea/deps/incbin/incbin.c:26:11: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
chr = *n;
~ ^~
/Users/Ingwie/Work/IceTea/deps/incbin/incbin.c:32:30: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
chr = *n + *line - pos;
~ ~~~~~~~~~~~^~~~~
/Users/Ingwie/Work/IceTea/deps/incbin/incbin.c:51:16: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
return pos - *line;
~~~~~~ ~~~~^~~~~~~
/Users/Ingwie/Work/IceTea/deps/incbin/incbin.c:103:1: warning: control may reach end of non-void function [-Wreturn-type]
}
^
/Users/Ingwie/Work/IceTea/deps/incbin/incbin.c:277:9: warning: variable 'ret' may be uninitialized when used here [-Wconditional-uninitialized]
if (ret == 0) {
^~~
/Users/Ingwie/Work/IceTea/deps/incbin/incbin.c:106:12: note: initialize the variable 'ret' to silence this warning
int ret, i, paths, files = 0, style = kCamel;
^
= 0
/Users/Ingwie/Work/IceTea/deps/incbin/incbin.c:257:25: warning: variable 'count' may be uninitialized when used here [-Wconditional-uninitialized]
if (count == 12) {
^~~~~
/Users/Ingwie/Work/IceTea/deps/incbin/incbin.c:239:43: note: initialize the variable 'count' to silence this warning
unsigned char *data, count;
^
= '\0'
6 warnings generated.
Ld build/Release/incbin normal x86_64
cd /Users/Ingwie/Work/IceTea/ide
export MACOSX_DEPLOYMENT_TARGET=10.11
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -L/Users/Ingwie/Work/IceTea/ide/build/Release -F/Users/Ingwie/Work/IceTea/ide/build/Release -filelist /Users/Ingwie/Work/IceTea/ide/build/IceTea.build/Release/incbin.build/Objects-normal/x86_64/incbin.LinkFileList -mmacosx-version-min=10.11 -Xlinker -dependency_info -Xlinker /Users/Ingwie/Work/IceTea/ide/build/IceTea.build/Release/incbin.build/Objects-normal/x86_64/incbin_dependency_info.dat -o /Users/Ingwie/Work/IceTea/ide/build/Release/incbin
GenerateDSYMFile build/Release/incbin.dSYM build/Release/incbin
cd /Users/Ingwie/Work/IceTea/ide
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil /Users/Ingwie/Work/IceTea/ide/build/Release/incbin -o /Users/Ingwie/Work/IceTea/ide/build/Release/incbin.dSYM
CodeSign build/Release/incbin
cd /Users/Ingwie/Work/IceTea/ide
export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
Signing Identity: "-"
/usr/bin/codesign --force --sign - --timestamp=none /Users/Ingwie/Work/IceTea/ide/build/Release/incbin
Any idea why incbin may have stopped emitting files? It reads my input as expected, but thats it. There is no emitting being done. Maybe it is using a flag that I've overseen that might be causing issues.
I have set up my IceTea tool to also build through XCode. This is merely an excercise to find my way around in the IDE itself by using code that I already wrote. On pure command line, everything works exactly as expected. But with XCode, incbin no longer emits files. I even copied the compiled binary and compared them, and saw that they were pretty different.
Here is an extract of what XCode does:
Any idea why incbin may have stopped emitting files? It reads my input as expected, but thats it. There is no emitting being done. Maybe it is using a flag that I've overseen that might be causing issues.