New issue
Advanced search Search tips

Issue 923607 link

Starred by 2 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature



Sign in to add a comment

cross compilation from linux to mac

Project Member Reported by kozy@chromium.org, Jan 19 (4 days ago)

Issue description

What steps will reproduce the problem?
(1) fetch v8
(2) echo "target_os= ['mac']" >> .gclient
(3) cd v8
(4) gn gen --args=target_os=\"mac\" -C out/default
(5) ninja -C out/default

What is the expected result?
Successful build.

What happens instead?
after step 4: assert(host_os == "mac", "Mac cross-compiles are unsupported.")

I am wondering since V8 can be built using clang, how hard it would be to make possible cross compilation from linux to mac?

I would be happy to do required work if someone helps me identify what is missing and what should be fixed / implemented.githu
 

Comment 1 by kozy@chromium.org, Jan 19 (4 days ago)

Cc: thakis@chromium.org
Hi Nico, based on [1] I believe that you are right person for this issue.

It looks like this should be much easier to fix then cross compilation from linux to windows. Could you provide your feedback?

[1] crbug.com/495204

Comment 2 by thakis@chromium.org, Jan 19 (4 days ago)

Is this for v8 or for chromium? (Since this is in the chromium bug tracker, not in v8's.)

v8 is easier than full chromium, but still difficult.

https://chromium-review.googlesource.com/c/chromium/src/+/1236713 has the basics to get this working. It also documents what doesn't work. (For v8, it's probably only the linker; for chromium also stuff like nibtool.)

From what I understand, progress on several think needed for lld.ld64 is happening upstream (the tapi library is in the process of kind-of getting upstreamed, but for elf, not mach-o, but maybe that'll get there; maybe lld's mach-o port will get modernized.) So we can either wait, or help push that along.

Since just waiting is easier, that's what I've been doing.

Comment 3 by kozy@chromium.org, Yesterday (32 hours ago)

I am mostly interested in V8 but Chrome would be nice as well so I can move this issue to V8 project if needed.
Thanks for great instruction, I follow it and got the same results: ld64 does not support .tbd format, so linker fails trying to find libSystem.tbd.
Based on [1] some work is in progress.

[1] http://lists.llvm.org/pipermail/cfe-dev/2018-September/059455.html

Sign in to add a comment