Граф коммитов

34 Коммитов

Автор SHA1 Сообщение Дата
Ralph Giles f56cb16c14 Bug 1336153 - Remove MOZ_RUST. r=ted
We now have code that unconditionally requires the rust
compiler and are committed to adding more. Remove this
last vestige of conditional support.

MozReview-Commit-ID: EK6FBnAbR

--HG--
extra : rebase_source : 6efda10a74f9ca0482304c2b1ffe6941e42138f8
2017-05-09 11:36:13 -07:00
Nathan Froyd d9e05176d0 Bug 1329737 - part 1 - define a RUST_TARGET_ENV_NAME config variable; r=rillian
We need this for forming various Cargo environment variables.
2017-04-28 14:06:42 -04:00
Tom Ritter f8c3899ea0 Bug 1353541 Fix rustc in MinGW build r=froydnj,ted
rustc generates .lib files for its libraries when compiling for Windows
(even using MinGW on Linux). But MinGW expects .a files. So we add in
rust-specific prefix and suffixes so MinGW builds can find the libs that
rustc generates. (And the RUST_LIB- variables default to the same vales
as the LIB_ variables otherwise.)

MozReview-Commit-ID: ClsA0YuJaxh

--HG--
extra : rebase_source : 7b46460c94ceb34b7a5a302ce91d3f1dca600041
2017-04-26 12:08:59 -05:00
Edmund Wong 33a667c380 Bug 1358403 - Add a colon to complete the rust url when mach build dies when it can't find the rust compiler. r=froydnj
MozReview-Commit-ID: 3E3A9laTdoX

--HG--
extra : rebase_source : 2c5745eadd935b0e20abfb2d106bdb247ea0b5e8
2017-04-21 15:43:14 +08:00
Jan Beich 20e7357c74 Bug 1340594 - Make sure Cargo version check can fail. r=froydnj
MozReview-Commit-ID: 9ggzbuE42Wc

--HG--
extra : rebase_source : b6af4b738c020004dc9f08ffa3221695c46bfa01
2017-02-25 04:11:26 +00:00
Ralph Giles d3fb57abec Bug 1340587 - Remove MOZ_CARGO_SUPPORTS_FROZEN. r=froydnj
We now require cargo by version, and the minimum (0.16)
supports --frozen, so we don't need to check for this.

MozReview-Commit-ID: GPoadLkhRO5

--HG--
extra : rebase_source : e191e5dd2533e28c1bca0812f2776196cc3559cf
2017-02-17 12:16:45 -08:00
Mike Hommey 885f0dae93 Bug 1339670 - Use cargo --version --verbose output when available. r=froydnj
Fallback to regexp on older versions of cargo.

--HG--
extra : rebase_source : d67c25ad48b1b23c9bb555b65e4241920914886f
2017-02-15 11:22:34 +09:00
Jan Beich 397f7a4910 Bug 1339161 - Add more rustc targets for cross-compilation. r=rillian
MozReview-Commit-ID: 5C7Bgsx2B2z

--HG--
extra : rebase_source : ee4e14091b772121f391568d21dd56ef68ac95be
2017-02-13 19:08:53 +00:00
Nathan Froyd 552f6522ad Bug 1298600 - part 2 - check Cargo's version; r=rillian
We need a particular version of Cargo, and we can't assume that because
the user has Rust 1.X, they necessarily have Cargo 0.(X+1).
2017-02-13 10:42:33 -05:00
Nathan Froyd a7c48382ee Bug 1298600 - part 1 - reindent rustc_info; r=rillian
For whatever reason, rustc_info was indented a bit too far.
2017-02-13 10:42:33 -05:00
Ralph Giles d9052fefa0 Bug 1337153 - Require rust 1.15.1. r=Ehsan
Bump the minimum version of the rust toolchain we require to
build. The 1.15 release includes support for custom #[derive]
directives, letting us use the serde serialization crate without
checking in a lot of generated code.

This is primarily motivated by webrender and the audio remoting
work, and lets us drop the heavy syntex dependency.

MozReview-Commit-ID: 6IObHhouPAn

--HG--
extra : rebase_source : 4be8b148fb653a48f6df4309811ab1d8755f7edf
2017-02-09 09:38:48 -08:00
Landry Breuil 54965a1d24 Bug 1336825 - Add i686-unknown-openbsd to known rust targets. r=froydnj 2017-02-05 12:36:00 -05:00
Ralph Giles 4efb911890 Bug 1284816 - Remove --disable-rust. r=ted
Remove the option to build without rust code. We are not testing
this configuration and expect to land non-optional rust code in
the near future, so it doesn't make sense to maintain this option.

MozReview-Commit-ID: CwTlMXGvr5n

--HG--
extra : rebase_source : 080a9df5b4828c66aa2452ad1c16a503bcd5e689
2017-02-01 15:38:49 -08:00
Makoto Kato 57a8e37fef Bug 1324994 - Add Linux/aarch64 target to rust.configure. r=glandium
MozReview-Commit-ID: 2St6G9FiOHz

--HG--
extra : rebase_source : 62c3e963035972d02c4e6f0e8b7770ded25e42d1
2016-12-21 14:44:11 +09:00
Ralph Giles 3a9dd658c4 Bug 1283898 - Enable rust by default. r=ted
Switch from --enable-rust to optionally enable rust code
to --disable-rust to optionally disable it.

MozReview-Commit-ID: C8cQr5MXUzV

--HG--
extra : rebase_source : 0372be3cc3da56b49104b80c41974139a488ecb2
2016-11-24 16:11:27 -08:00
Ralph Giles d3c4fa1f17 Bug 1320710 - Target i686 rust code on linux32. r=froydnj
Official Mozilla builds no longer support non-SSE2 x86 cpus,
so we can use the default i686 rust target here. This allows
better code generation and removes a dependency on the extra
i585 rust std library.

MozReview-Commit-ID: BHrm4tieIym

--HG--
extra : rebase_source : e791068b6128b9f3153b9c85ebd8551d583c2bc7
2016-11-28 09:17:11 -08:00
Ralph Giles af3411a664 Bug 1321696 - Require rust 1.13 with --enable-rust. r=chmanchester
Bug 1320425 using the '?' operator stabilized in rust 1.13.0.
Update the minimum supported version to reflect this.

MozReview-Commit-ID: 3HKrhfNavEZ

--HG--
extra : rebase_source : 3acb73d551b5c24dff61254e74d0c1c514b2a77c
2016-12-01 17:35:52 -08:00
Ralph Giles eec7f7ee4a Bug 1321691 - Suggest boostrap if configure fails to find rust. r=chmanchester
Now that `./mach boostrap` installs rustup, suggest this if
configure fails to find the toolchain when building with
--enable-rust.

Also point out https://rustup.rs/ for those who want more control.

MozReview-Commit-ID: 8JIbERfz12f

--HG--
extra : rebase_source : a23b3f747f1d430120f16b56e79085dabf3b2018
2016-12-01 17:01:55 -08:00
Ralph Giles 492e3e6a3b Bug 1320741 - Recommend `rustup target add`. r=chmanchester
Provide some guidance on how to resolve the common

  error: can't find crate for `std`

when cross-compiling rust code. This most commonly comes up
with the Android build.

MozReview-Commit-ID: 8PKKt7tf1KS

--HG--
extra : rebase_source : 5d18bb3a2ef8b3c4c5700b87c4a899b26160999d
2016-11-28 10:51:59 -08:00
Nathan Froyd 00c9adec24 Bug 1293253 - part 3 - add configure support for determining a --target value for Rust host code; r=chmanchester
We'll need this for compiling host binaries.  We could just call `rustc`
without any --target value whatsoever, but since we use --target for
target code, we might as well be consistent and explicit, and use
--target for host code as well.
2016-11-28 11:20:39 -05:00
Mike Hommey 6fa3828b4e Bug 1316844 - Remove unused dependencies. r=chmanchester
--HG--
extra : rebase_source : f9c4f39b198fbb83aa02b2eee65863695e7b75ca
2016-11-11 12:52:37 +09:00
Ralph Giles efaa5037bb Bug 1266792 - Target armv7 android. r=kinetik,snorp
We actually target armv7, so we need this distinct triple
with the rust toolchain, while it's implicit with the
android ndk.

MozReview-Commit-ID: LUwdpOaWB6M

--HG--
extra : rebase_source : 820de90d0844e1519f9e02a583c8cc3abf1dfdc0
2016-10-27 12:19:59 -07:00
Ralph Giles ca13da128b Bug 1299864 - Target i585 linux when building rust code. r=glandium
Update linux32 tooltool manifest to use a gecko build of rustc and cargo
for x86_64-unknown-linux-gnu host targeting both x86_64 and i586.

    rustc built with --enable-llvm-static-stdcpp --disable-docs
    --enable-debuginfo --release-channel=stable from 'stable' branch
    rust 1.11.0 (commit 9b21dcd6a89f38e8ceccb2ede8c9027cb409f6e3)

Pass --target i585-unknown-linux-gnu when building for 32-bit linux.
We mostly want this for official builds, but Debian needs it too,
in both cases to support old machines without SSE2 instruction set
support, so while it means developers will have to `rustup target add
i585-unknown-linux-gnu` when building for this architecture that is
not a common task (most linux devs will be on 64-bit) and it reduces
variance and surprise if binaries are distributed.

MozReview-Commit-ID: 3mAjWxYGpwZ
2016-09-07 10:40:29 -07:00
Nathan Froyd 81545d0022 Bug 1290957 - ensure MOZ_AUTOMATION builds require a cargo with --frozen support; r=chmanchester
We want to ensure that our automation builds don't pull in libraries
from crates.io, and we need --frozen support in cargo to do that.  If we
don't have that support, we shouldn't build.
2016-08-09 18:10:19 -04:00
Nathan Froyd d4a5791899 Bug 1268727 - part 1 - update Rust requirement to 1.10; r=chmanchester
We need Rust 1.10 to support the -C panic=abort flag and the
corresponding bits in cargo.
2016-08-09 18:10:20 -04:00
Nathan Froyd f7fb6722a6 Bug 1231764 - part 6 - build rust code via cargo; r=chmanchester
This patch is really two separate changes.

The first change is that rust crates are large, standalone entities that
may contain multitudes of source files.  It therefore doesn't make sense
to keep them in SOURCES, as we have been doing.  Moving to use cargo
will require a higher-level approach, which suggests that we need a
different, higher-level representation for Rust sources in the build
system.

The representation here is to have the build system refer to things
defined in Cargo.toml files as the entities dealt with in the build
system, and let Cargo deal with the details of actually building things.
This approach means that adding a new crate to an existing library just
requires editing Rust and Cargo.toml files, rather than dealing with
moz.build, which seems more natural to Rust programmers.  By having the
source files for libraries (and binaries in subsequent iterations of
this support) checked in to the tree, we can also take advantage of
Cargo.lock files.

The second is that we switch the core build system over to building via
cargo, rather than invoking rustc directly.

We also clean up a number of leftover things from the Old Way of doing
things.  A number of tests are added to confirm that we'll only permit
crates to be built that have dependencies in-tree.
2016-08-06 00:49:26 -04:00
Nathan Froyd 8e363d817c Bug 1231764 - part 1 - search for cargo when --enable-rust; r=chmanchester
We've going to use it, the location of it should be configurable.
2016-08-06 00:49:26 -04:00
Wes Kocher 9605851be0 Backed out 7 changesets (bug 1231764) for apparently causing linux debug wpt bustage
Backed out changeset 4b71272c92cf (bug 1231764)
Backed out changeset 234d8a930afa (bug 1231764)
Backed out changeset f9b204c2f5a7 (bug 1231764)
Backed out changeset f933119e57e4 (bug 1231764)
Backed out changeset e3af0b1d3473 (bug 1231764)
Backed out changeset 643b03aae1dd (bug 1231764)
Backed out changeset a945dbf63410 (bug 1231764)

--HG--
extra : rebase_source : e71360fa4b5e3e74859c82e74e183e13e6211c4c
2016-08-03 16:27:06 -07:00
Nathan Froyd 6b2618fb44 Bug 1231764 - part 6 - build rust code via cargo; r=chmanchester
This patch is really two separate changes.

The first change is that rust crates are large, standalone entities that
may contain multitudes of source files.  It therefore doesn't make sense
to keep them in SOURCES, as we have been doing.  Moving to use cargo
will require a higher-level approach, which suggests that we need a
different, higher-level representation for Rust sources in the build
system.

The representation here is to have the build system refer to things
defined in Cargo.toml files as the entities dealt with in the build
system, and let Cargo deal with the details of actually building things.
This approach means that adding a new crate to an existing library just
requires editing Rust and Cargo.toml files, rather than dealing with
moz.build, which seems more natural to Rust programmers.  By having the
source files for libraries (and binaries in subsequent iterations of
this support) checked in to the tree, we can also take advantage of
Cargo.lock files.

The second is that we switch the core build system over to building via
cargo, rather than invoking rustc directly.

We also clean up a number of leftover things from the Old Way of doing
things.  A number of tests are added to confirm that we'll only permit
crates to be built that have dependencies in-tree.
2016-08-03 19:40:41 -04:00
Nathan Froyd 8aab949aa8 Bug 1231764 - part 1 - search for cargo when --enable-rust; r=chmanchester
We've going to use it, the location of it should be configurable.
2016-08-03 19:40:41 -04:00
Jan Beich be3a9d9f97 Bug 1285503 - Fix DragonFly target spelling after bug 1266368. r=glandium
MozReview-Commit-ID: 48qNqNa8CdP

--HG--
extra : transplant_source : %15%F6%E6z%E3%8F%AD%15%9C%0F%2B%AB%AE%BC%F5%EA%18%FE%86%F7
2016-07-08 06:36:11 +00:00
Ralph Giles bb6518c3f2 Bug 1290522 - Parse `rustc --version --verbose` in moz.configure. r=glandium
This is hopefully more reliable than parsing just the summary line,
and makes available other keys like the commit-hash which we'd like
to pass to the debug symbol automation.

Note that the commit-hash field will have the value 'unknown' for
builds not made out of upstream git. So the key is available with
official and gecko rust builds, but not for example the current
Debian-packaged rustc.

MozReview-Commit-ID: A2G5UPs2ka2
2016-07-29 10:39:17 -07:00
Tom Tromey 5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06:00
Ted Mielczarek 82d77574ff bug 1266368 - move rust.m4 to configure. r=glandium
MozReview-Commit-ID: 9ol2nMYM0a0

--HG--
extra : rebase_source : 3f3feeac941791d081e09ebb096a3e052540a52c
2016-05-16 15:27:37 -04:00