forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Config changes to support target_os="fuchsia"
Fuchsia support has been upstreamed into Clang, so the existing Linux-hosted Clang toolchain binaries in third_party with the correct --target are sufficient. Fuchsia is POSIXy so a lot of things will just work, but some places will require different implementations, so this CL adds support for is_fuchsia as well as a basic implementation of the toolchain config. The SDK (headers, sysroot, etc.) is currently available at go/fuchsia-sdk until a standard location for it is decided upon. The near term goal behind this CL is to bring up base/ and net/ on an fyi bot running Fuchsia. BUG=706592 Review-Url: https://codereview.chromium.org/2784063002 Cr-Commit-Position: refs/heads/master@{#471360}
- Loading branch information
Showing
17 changed files
with
149 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Copyright 2017 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
import("//build/config/sysroot.gni") | ||
|
||
assert(is_fuchsia) | ||
assert(is_posix) | ||
|
||
config("compiler") { | ||
defines = [ "SYSROOT_VERSION=$sysroot_version" ] | ||
cflags = [] | ||
ldflags = [] | ||
if (current_cpu == "arm64") { | ||
cflags += [ "--target=aarch64-fuchsia" ] | ||
ldflags += [ "--target=aarch64-fuchsia" ] | ||
} else if (current_cpu == "x64") { | ||
cflags += [ "--target=x86_64-fuchsia" ] | ||
ldflags += [ "--target=x86_64-fuchsia" ] | ||
} else { | ||
assert(false, "Unsupported architecture") | ||
} | ||
asmflags = cflags | ||
|
||
libs = [ | ||
"mxio", | ||
"magenta", | ||
"unwind", | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
scottmg@chromium.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Copyright 2017 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
assert(current_os == "fuchsia") | ||
|
||
declare_args() { | ||
# Path to Fuchsia SDK. | ||
fuchsia_sdk = "//third_party/fuchsia-sdk" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Copyright 2017 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
import("//build/toolchain/gcc_toolchain.gni") | ||
import("//build/config/fuchsia/config.gni") | ||
|
||
clang_toolchain("x64") { | ||
assert(current_cpu == "x64") | ||
assert(host_os == "linux") | ||
|
||
toolchain_args = { | ||
current_cpu = "x64" | ||
current_os = "fuchsia" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
scottmg@chromium.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.