Skip to content

Commit

Permalink
Omit the vendor component in Fuchsia triple
Browse files Browse the repository at this point in the history
Previously, using unknown as the vendor value would lead to the same
result, but with the multiarch runtimes support in Clang, the target is
now used to locate the runtime libraries and so the format is important.
The denormalized format with omitted vendor component is the format we
use with Clang and should be using for Rust as well.
  • Loading branch information
petrhosek committed Jul 27, 2018
1 parent fefe816 commit e950d22
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 22 deletions.
16 changes: 8 additions & 8 deletions src/ci/docker/dist-various-2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,21 @@ COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

ENV \
AR_x86_64_unknown_fuchsia=x86_64-unknown-fuchsia-ar \
CC_x86_64_unknown_fuchsia=x86_64-unknown-fuchsia-clang \
CXX_x86_64_unknown_fuchsia=x86_64-unknown-fuchsia-clang++ \
AR_aarch64_unknown_fuchsia=aarch64-unknown-fuchsia-ar \
CC_aarch64_unknown_fuchsia=aarch64-unknown-fuchsia-clang \
CXX_aarch64_unknown_fuchsia=aarch64-unknown-fuchsia-clang++ \
AR_x86_64_fuchsia=x86_64-fuchsia-ar \
CC_x86_64_fuchsia=x86_64-fuchsia-clang \
CXX_x86_64_fuchsia=x86_64-fuchsia-clang++ \
AR_aarch64_fuchsia=aarch64-fuchsia-ar \
CC_aarch64_fuchsia=aarch64-fuchsia-clang \
CXX_aarch64_fuchsia=aarch64-fuchsia-clang++ \
AR_sparcv9_sun_solaris=sparcv9-sun-solaris2.10-ar \
CC_sparcv9_sun_solaris=sparcv9-sun-solaris2.10-gcc \
CXX_sparcv9_sun_solaris=sparcv9-sun-solaris2.10-g++ \
AR_x86_64_sun_solaris=x86_64-sun-solaris2.10-ar \
CC_x86_64_sun_solaris=x86_64-sun-solaris2.10-gcc \
CXX_x86_64_sun_solaris=x86_64-sun-solaris2.10-g++

ENV TARGETS=x86_64-unknown-fuchsia
ENV TARGETS=$TARGETS,aarch64-unknown-fuchsia
ENV TARGETS=x86_64-fuchsia
ENV TARGETS=$TARGETS,aarch64-fuchsia
ENV TARGETS=$TARGETS,sparcv9-sun-solaris
ENV TARGETS=$TARGETS,wasm32-unknown-unknown
ENV TARGETS=$TARGETS,x86_64-sun-solaris
Expand Down
10 changes: 5 additions & 5 deletions src/ci/docker/dist-various-2/build-fuchsia-toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ build() {
esac

hide_output make -j$(getconf _NPROCESSORS_ONLN) $tgt
dst=/usr/local/${arch}-unknown-fuchsia
dst=/usr/local/${arch}-fuchsia
mkdir -p $dst
cp -a build-${tgt}/sysroot/include $dst/
cp -a build-${tgt}/sysroot/lib $dst/
Expand All @@ -55,11 +55,11 @@ rm -rf zircon

for arch in x86_64 aarch64; do
for tool in clang clang++; do
cat >/usr/local/bin/${arch}-unknown-fuchsia-${tool} <<EOF
cat >/usr/local/bin/${arch}-fuchsia-${tool} <<EOF
#!/bin/sh
${tool} --target=${arch}-unknown-fuchsia --sysroot=/usr/local/${arch}-unknown-fuchsia "\$@"
${tool} --target=${arch}-fuchsia --sysroot=/usr/local/${arch}-fuchsia "\$@"
EOF
chmod +x /usr/local/bin/${arch}-unknown-fuchsia-${tool}
chmod +x /usr/local/bin/${arch}-fuchsia-${tool}
done
ln -s /usr/local/bin/llvm-ar /usr/local/bin/${arch}-unknown-fuchsia-ar
ln -s /usr/local/bin/llvm-ar /usr/local/bin/${arch}-fuchsia-ar
done
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ pub fn target() -> TargetResult {
base.max_atomic_width = Some(128);

Ok(Target {
llvm_target: "aarch64-unknown-fuchsia".to_string(),
llvm_target: "aarch64-fuchsia".to_string(),
target_endian: "little".to_string(),
target_pointer_width: "64".to_string(),
target_c_int_width: "32".to_string(),
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(),
arch: "aarch64".to_string(),
target_os: "fuchsia".to_string(),
target_env: "".to_string(),
target_vendor: "unknown".to_string(),
target_vendor: "".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {
abi_blacklist: super::arm_base::abi_blacklist(),
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_target/spec/fuchsia_base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub fn opts() -> TargetOptions {
executables: true,
target_family: Some("unix".to_string()),
linker_is_gnu: true,
has_rpath: true,
has_rpath: false,
pre_link_args: args,
position_independent_executables: true,
has_elf_tls: true,
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_target/spec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,8 @@ supported_targets! {
("x86_64-apple-darwin", x86_64_apple_darwin),
("i686-apple-darwin", i686_apple_darwin),

("aarch64-unknown-fuchsia", aarch64_unknown_fuchsia),
("x86_64-unknown-fuchsia", x86_64_unknown_fuchsia),
("aarch64-fuchsia", aarch64_fuchsia),
("x86_64-fuchsia", x86_64_fuchsia),

("x86_64-unknown-l4re-uclibc", x86_64_unknown_l4re_uclibc),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ pub fn target() -> TargetResult {
base.stack_probes = true;

Ok(Target {
llvm_target: "x86_64-unknown-fuchsia".to_string(),
llvm_target: "x86_64-fuchsia".to_string(),
target_endian: "little".to_string(),
target_pointer_width: "64".to_string(),
target_c_int_width: "32".to_string(),
data_layout: "e-m:e-i64:64-f80:128-n8:16:32:64-S128".to_string(),
arch: "x86_64".to_string(),
target_os: "fuchsia".to_string(),
target_env: "".to_string(),
target_vendor: "unknown".to_string(),
target_vendor: "".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: base,
})
Expand Down
4 changes: 2 additions & 2 deletions src/tools/build-manifest/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ static HOSTS: &'static [&'static str] = &[

static TARGETS: &'static [&'static str] = &[
"aarch64-apple-ios",
"aarch64-fuchsia",
"aarch64-linux-android",
"aarch64-unknown-cloudabi",
"aarch64-unknown-fuchsia",
"aarch64-unknown-linux-gnu",
"aarch64-unknown-linux-musl",
"arm-linux-androideabi",
Expand Down Expand Up @@ -101,14 +101,14 @@ static TARGETS: &'static [&'static str] = &[
"wasm32-unknown-unknown",
"x86_64-apple-darwin",
"x86_64-apple-ios",
"x86_64-fuchsia",
"x86_64-linux-android",
"x86_64-pc-windows-gnu",
"x86_64-pc-windows-msvc",
"x86_64-rumprun-netbsd",
"x86_64-sun-solaris",
"x86_64-unknown-cloudabi",
"x86_64-unknown-freebsd",
"x86_64-unknown-fuchsia",
"x86_64-unknown-linux-gnu",
"x86_64-unknown-linux-gnux32",
"x86_64-unknown-linux-musl",
Expand Down

0 comments on commit e950d22

Please sign in to comment.