I'm afraid we don't officially support cross-compiling on OSX, which means it might work, but you're on your own. We'd be happy to accept patches or documentation improvements, with community-maintained status.
That said: I'd set is_clang=false and use_sysroot=false in args.gn, and set CC/CXX/LINK via the environment. How far does that get you? target_os=["android"] in .gclient should not be necessary. I believe that only controls the downloading of the Android NDK, which you're not interested in using. GN ("generate ninja") and Ninja work together to provide Make-like functionality. Ninja is designed to be simple but fast, GN does all the evaluation of flags and conditions. By inspecting the generated *.ninja files, you can check what GN did with the args you provided. gclient is a dependency management tool (similar to git submodules); it is not involved in the build process itself. On Wed, Sep 19, 2018 at 4:00 AM <gra...@grahamreeves.com> wrote: > I'm trying to build v8 for an arm cpu, and I have gcc/++/etc for that > architecture built on osx (so I can cross compile), which currently builds > my executable, all working fine. > > Now I'm hoping to build v8. Whatever OS side changes I might need to make, > (this is not for linux) I can do. > > What I haven't managed to do yet, is get v8 compiling. > Is this possible with depot_tools/ninja ? > > I've not been able to find any guides so far that aren't android focussed, > eg. > > https://stackoverflow.com/questions/43490689/cross-compiling-v8-build-for-android-on-mac > https://github.com/v8/v8/wiki/Cross-compiling-for-ARM > > From what I can tell, the gclient setup has some specific setup for when > the target_os is "android". > Maybe it's using some explicit NDK based paths to find GCC executables? > (This is a little hidden) > I looked at the gn --args all and couldn't really see anything about > explicitly setting toolchain paths > > Is convention to build as if it's android, and maybe swap out all of NDK's > gcc with my own? > or set the target_os to unix, and then... where would I put the toolchain? > > I've set *is_clang = false* > > Unless I'm overthinking it? This is my error when I try to build > arm.release. I have been assuming there are no rules setup to build .cc > with a particular gcc executable > > ninja: error: '../../src/base/bits.cc', needed by > 'clang_x86_v8_arm/obj/v8_libbase/bits.o', missing and no known rule to make > it > > > toolchain.ninja (which I assume is like a makefile, I'm very new to > ninja/gclient) has entries for cc > > rule cc > > command = ../../third_party/llvm-build/Release+Asserts/bin/clang -MMD > -MF ${out}.d ${defines} ${include_dirs} ${cflags} ${cflags_c} -c ${in} -o > ${out} > > description = CC ${out} > > depfile = ${out}.d > > deps = gcc > But I guess they're inheritly wrong? > > I feel like I've just missed an obvious step with setting up the target, > but the android setup is obfuscated so I'm blindly hunting around trying to > see if export CC= is set somewhere :) > > > -- > -- > v8-dev mailing list > v8-dev@googlegroups.com > http://groups.google.com/group/v8-dev > --- > You received this message because you are subscribed to the Google Groups > "v8-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to v8-dev+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- -- v8-dev mailing list v8-dev@googlegroups.com http://groups.google.com/group/v8-dev --- You received this message because you are subscribed to the Google Groups "v8-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.