Closed thejoelw closed 6 years ago
zapcc was never built on MacOS. The LLVM code will compile OK, but the client-server code in zapcc will probably fail compiling. Anyhow, does c2b11ba7d65eb36a595f8da5044e39868d8d825b solve this specific compile error?
Ok. In that case it's kind of impressive it's getting this far.
Yep, that fixes that error. Now I'm getting a linker error ld: unknown option: --wrap=memcpy
~/s/z/build> ninja
[83/102] Linking CXX executable bin/zapcc
FAILED: bin/zapcc
: && /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -fPIC -fvisibility-inlines-hidden -std=c++11 -w -fcolor-diagnostics -O3 -DNDEBUG -Wl,-search_paths_first -Wl,-headerpad_max_install_names -static-libstdc++ -Wl,--wrap=memcpy -Wl,-dead_strip tools/zapcc/CMakeFiles/zapcc.dir/Client.cpp.o tools/zapcc/CMakeFiles/zapcc.dir/ErrorCouldNot.cpp.o tools/zapcc/CMakeFiles/zapcc.dir/FindBaseName.cpp.o tools/zapcc/CMakeFiles/zapcc.dir/TerminateAllCopiesOf.cpp.o tools/zapcc/CMakeFiles/zapcc.dir/tinycthread.c.o tools/zapcc/CMakeFiles/zapcc.dir/zapcc1_main.cpp.o tools/zapcc/CMakeFiles/zapcc.dir/__/clang/tools/driver/cc1_main.cpp.o tools/zapcc/CMakeFiles/zapcc.dir/__/clang/tools/driver/cc1as_main.cpp.o tools/zapcc/CMakeFiles/zapcc.dir/__/clang/tools/driver/driver.cpp.o tools/zapcc/CMakeFiles/zapcc.dir/__/zapccs/CommandLine.cpp.o tools/zapcc/CMakeFiles/zapcc.dir/__/zapccs/DisableStreamsBuffering.cpp.o tools/zapcc/CMakeFiles/zapcc.dir/__/zapccs/FindOption.cpp.o tools/zapcc/CMakeFiles/zapcc.dir/__/zapccs/GetExePath.cpp.o tools/zapcc/CMakeFiles/zapcc.dir/__/zapccs/memcpy_compat.c.o tools/zapcc/CMakeFiles/zapcc.dir/__/zapccs/StringConst.cpp.o tools/zapcc/CMakeFiles/zapcc.dir/__/zapccs/StopWatch.cpp.o tools/zapcc/CMakeFiles/zapcc.dir/__/zapccs/TextFile.cpp.o -o bin/zapcc -Wl,-rpath,@loader_path/../lib lib/libLLVMAArch64CodeGen.a lib/libLLVMAArch64AsmPrinter.a lib/libLLVMAArch64AsmParser.a lib/libLLVMAArch64Desc.a lib/libLLVMAArch64Info.a lib/libLLVMAArch64Disassembler.a lib/libLLVMAArch64Info.a lib/libLLVMAArch64Utils.a lib/libLLVMAMDGPUCodeGen.a lib/libLLVMAMDGPUAsmPrinter.a lib/libLLVMAMDGPUAsmParser.a lib/libLLVMAMDGPUDesc.a lib/libLLVMAMDGPUInfo.a lib/libLLVMAMDGPUDisassembler.a lib/libLLVMAMDGPUInfo.a lib/libLLVMAMDGPUUtils.a lib/libLLVMARMCodeGen.a lib/libLLVMARMAsmPrinter.a lib/libLLVMARMAsmParser.a lib/libLLVMARMDesc.a lib/libLLVMARMInfo.a lib/libLLVMARMDisassembler.a lib/libLLVMARMInfo.a lib/libLLVMBPFCodeGen.a lib/libLLVMBPFAsmPrinter.a lib/libLLVMBPFDesc.a lib/libLLVMBPFInfo.a lib/libLLVMBPFDisassembler.a lib/libLLVMBPFInfo.a lib/libLLVMHexagonCodeGen.a lib/libLLVMHexagonAsmParser.a lib/libLLVMHexagonDesc.a lib/libLLVMHexagonInfo.a lib/libLLVMHexagonDisassembler.a lib/libLLVMHexagonInfo.a lib/libLLVMLanaiCodeGen.a lib/libLLVMLanaiAsmPrinter.a lib/libLLVMLanaiAsmParser.a lib/libLLVMLanaiDesc.a lib/libLLVMLanaiInfo.a lib/libLLVMLanaiDisassembler.a lib/libLLVMLanaiInfo.a lib/libLLVMMipsCodeGen.a lib/libLLVMMipsAsmPrinter.a lib/libLLVMMipsAsmParser.a lib/libLLVMMipsDesc.a lib/libLLVMMipsInfo.a lib/libLLVMMipsDisassembler.a lib/libLLVMMipsInfo.a lib/libLLVMMSP430CodeGen.a lib/libLLVMMSP430AsmPrinter.a lib/libLLVMMSP430Desc.a lib/libLLVMMSP430Info.a lib/libLLVMMSP430Info.a lib/libLLVMNVPTXCodeGen.a lib/libLLVMNVPTXAsmPrinter.a lib/libLLVMNVPTXDesc.a lib/libLLVMNVPTXInfo.a lib/libLLVMNVPTXInfo.a lib/libLLVMPowerPCCodeGen.a lib/libLLVMPowerPCAsmPrinter.a lib/libLLVMPowerPCAsmParser.a lib/libLLVMPowerPCDesc.a lib/libLLVMPowerPCInfo.a lib/libLLVMPowerPCDisassembler.a lib/libLLVMPowerPCInfo.a lib/libLLVMRISCVCodeGen.a lib/libLLVMRISCVDesc.a lib/libLLVMRISCVInfo.a lib/libLLVMRISCVInfo.a lib/libLLVMSparcCodeGen.a lib/libLLVMSparcAsmPrinter.a lib/libLLVMSparcAsmParser.a lib/libLLVMSparcDesc.a lib/libLLVMSparcInfo.a lib/libLLVMSparcDisassembler.a lib/libLLVMSparcInfo.a lib/libLLVMSystemZCodeGen.a lib/libLLVMSystemZAsmPrinter.a lib/libLLVMSystemZAsmParser.a lib/libLLVMSystemZDesc.a lib/libLLVMSystemZInfo.a lib/libLLVMSystemZDisassembler.a lib/libLLVMSystemZInfo.a lib/libLLVMX86CodeGen.a lib/libLLVMX86AsmPrinter.a lib/libLLVMX86AsmParser.a lib/libLLVMX86Desc.a lib/libLLVMX86Info.a lib/libLLVMX86Disassembler.a lib/libLLVMX86Info.a lib/libLLVMX86Utils.a lib/libLLVMXCoreCodeGen.a lib/libLLVMXCoreAsmPrinter.a lib/libLLVMXCoreDesc.a lib/libLLVMXCoreInfo.a lib/libLLVMXCoreDisassembler.a lib/libLLVMXCoreInfo.a lib/libLLVMAnalysis.a lib/libLLVMCodeGen.a lib/libLLVMCore.a lib/libLLVMipo.a lib/libLLVMInstCombine.a lib/libLLVMInstrumentation.a lib/libLLVMMC.a lib/libLLVMMCParser.a lib/libLLVMObjCARCOpts.a lib/libLLVMOption.a lib/libLLVMScalarOpts.a lib/libLLVMSupport.a lib/libLLVMTransformUtils.a lib/libLLVMVectorize.a lib/libclangBasic.a lib/libclangCodeGen.a lib/libclangDriver.a lib/libclangFrontend.a lib/libclangFrontendTool.a lib/libLLVMAArch64Desc.a lib/libLLVMAArch64AsmPrinter.a lib/libLLVMAArch64Info.a lib/libLLVMAArch64Utils.a lib/libLLVMAMDGPUDesc.a lib/libLLVMAMDGPUAsmPrinter.a lib/libLLVMAMDGPUInfo.a lib/libLLVMAMDGPUUtils.a lib/libLLVMARMDesc.a lib/libLLVMARMAsmPrinter.a lib/libLLVMARMInfo.a lib/libLLVMBPFAsmPrinter.a lib/libLLVMHexagonDesc.a lib/libLLVMHexagonInfo.a lib/libLLVMLanaiDesc.a lib/libLLVMLanaiAsmPrinter.a lib/libLLVMLanaiInfo.a lib/libLLVMMipsAsmPrinter.a lib/libLLVMMSP430AsmPrinter.a lib/libLLVMNVPTXAsmPrinter.a lib/libLLVMPowerPCAsmPrinter.a lib/libLLVMSparcAsmPrinter.a lib/libLLVMSystemZDesc.a lib/libLLVMSystemZAsmPrinter.a lib/libLLVMSystemZInfo.a lib/libLLVMGlobalISel.a lib/libLLVMX86AsmPrinter.a lib/libLLVMX86Utils.a lib/libLLVMXCoreAsmPrinter.a lib/libLLVMAsmPrinter.a lib/libLLVMDebugInfoCodeView.a lib/libLLVMDebugInfoMSF.a lib/libLLVMSelectionDAG.a lib/libLLVMMCDisassembler.a lib/libclangCodeGen.a lib/libLLVMCoroutines.a lib/libLLVMCoverage.a lib/libLLVMLTO.a lib/libLLVMObjCARCOpts.a lib/libLLVMPasses.a lib/libLLVMCodeGen.a lib/libLLVMTarget.a lib/libLLVMipo.a lib/libLLVMBitWriter.a lib/libLLVMIRReader.a lib/libLLVMAsmParser.a lib/libLLVMLinker.a lib/libLLVMInstrumentation.a lib/libLLVMScalarOpts.a lib/libLLVMInstCombine.a lib/libLLVMVectorize.a lib/libLLVMTransformUtils.a lib/libLLVMAnalysis.a lib/libLLVMObject.a lib/libclangRewriteFrontend.a lib/libclangARCMigrate.a lib/libclangStaticAnalyzerFrontend.a lib/libclangFrontend.a lib/libclangDriver.a lib/libLLVMOption.a lib/libLLVMProfileData.a lib/libclangParse.a lib/libLLVMMCParser.a lib/libclangSerialization.a lib/libLLVMBitReader.a lib/libclangSema.a lib/libclangEdit.a lib/libclangStaticAnalyzerCheckers.a lib/libclangASTMatchers.a lib/libclangStaticAnalyzerCore.a lib/libclangAnalysis.a lib/libclangAST.a lib/libclangRewrite.a lib/libclangLex.a lib/libclangBasic.a lib/libLLVMCore.a lib/libLLVMBinaryFormat.a lib/libLLVMMC.a lib/libLLVMSupport.a -lcurses -lz -lm lib/libLLVMDemangle.a && cd /Users/tjxw4/source/zapcc/build/tools/zapcc && /usr/local/Cellar/cmake/3.11.4/bin/cmake -E create_symlink zapcc /Users/tjxw4/source/zapcc/build/./bin/zapcc++ && cd /Users/tjxw4/source/zapcc/build/tools/zapcc && /usr/local/Cellar/cmake/3.11.4/bin/cmake -E create_symlink zapcc /Users/tjxw4/source/zapcc/build/./bin/zapcc-cl
ld: unknown option: --wrap=memcpy
clang: error: linker command failed with exit code 1 (use -v to see invocation)
@JWalker1995 #6 fixes that.
Actually, the whole memcpy thing was a solution to a compatibility problem when distributing a precompiled binary. Open source edition does not need this anymore, eliminated the whole mess in c74f82da81b310dace3e1b53046d7dac12d8d676.
Does zapcc work now on MacOS?
Yep that fixes the build! Thanks
Good to know! I mean to ask, after building zapcc, does zapcc compile correctly multiple files?
Compile output:
System details:
Mac OSX 10.13.3 (17D102)