Commit Graph

63 Commits

Author SHA1 Message Date
David Tolnay
d49ab2265a
Resolve starlark linter warnings
$ buck2 starlark lint tools/buck
    tools/buck/buildscript.bzl:7:9-13: Unused argument `cfgs`
    tools/buck/buildscript.bzl:6:9-16: Unused argument `version`
    tools/buck/buildscript.bzl:8:9-17: Unused argument `features`
    tools/buck/buildscript.bzl:3:9-21: Unused argument `package_name`
2023-01-20 16:20:58 -08:00
David Tolnay
2e4c57880d
Lockfile update 2023-01-07 12:15:08 -08:00
David Tolnay
173ec012c1
Experiment with @rules_rust//crate_universe 2022-12-20 18:46:44 -08:00
David Tolnay
f5088edac4
Reindeer update 2022-12-20 14:38:26 -08:00
David Tolnay
3f5a4605c6
Pull in buck2 support for non-nightly rustdoc 2022-12-19 15:19:24 -08:00
David Tolnay
5b864b789e
No longer need separate linker flags for the Rust toolchain 2022-12-19 15:19:08 -08:00
David Tolnay
d5399f19aa
Fill in type annotations on Buck bzl files 2022-12-19 11:05:52 -08:00
David Tolnay
8da631208d
Explicitly no default_edition for system Rust toolchain 2022-12-16 13:47:42 -08:00
David Tolnay
eed38691e2
Switch to buck2's system toolchains 2022-12-15 14:41:07 -08:00
David Tolnay
49e4e65dd3
Pull buck2 prelude from buck2-prelude repo 2022-12-15 11:23:39 -08:00
David Tolnay
62228de09a
Pull in update of buck2 prelude 2022-12-08 18:18:37 -08:00
David Tolnay
665d913e12
Sort attributes of CxxToolchainInfo 2022-12-08 18:17:54 -08:00
David Tolnay
22d0c8e305
Explicitly no default edition during buck2 build 2022-12-06 17:24:49 -08:00
David Tolnay
29674ae7f2
Format toolchain.bzl with buildifier 2022-12-06 17:23:26 -08:00
David Tolnay
2194551012
Match c++ toolchain's declaration of runnable commands 2022-12-06 17:23:01 -08:00
David Tolnay
6dcd9971ec
Rustdoc works in buck2, but needs extern-html-root-url 2022-12-06 16:59:46 -08:00
David Tolnay
89827822ea
Buck2 now supports stable rustc 2022-12-06 16:23:25 -08:00
David Tolnay
c9d04395b3
Touch up toolchain definition 2022-12-05 13:35:09 -08:00
David Tolnay
2d337cc4d6
Wire up a buck2 failure_filter 2022-12-05 13:04:15 -08:00
David Tolnay
8bf38e39d6
Delete empty lists from toolchain args that can now be omitted 2022-12-05 12:05:19 -08:00
David Tolnay
35409c311f
Generate third-party BUCK targets using reindeer 2022-12-02 23:50:04 -08:00
David Tolnay
5f275bc40e
Reduce the set of crates that get vendored
Before:

    adler-1.0.2                  libc-0.2.137            serde_json-1.0.89
    bitflags-1.3.2               link-cplusplus-1.0.7    strsim-0.10.0
    cc-1.0.77                    memmap-0.7.0            syn-1.0.105
    cfg-if-1.0.0                 miniz_oxide-0.6.2       termcolor-1.1.3
    clang-ast-0.1.9              once_cell-1.16.0        toml-0.5.9
    clap-4.0.29                  os_str_bytes-6.4.1      trybuild-1.0.72
    clap_lex-0.3.0               pkg-config-0.3.26       unicode-ident-1.0.5
    codespan-reporting-0.11.1    proc-macro2-1.0.47      unicode-width-0.1.10
    crc32fast-1.3.2              quote-1.0.21            winapi-0.3.9
    dissimilar-1.0.4             rustversion-1.0.9       winapi-i686-pc-windows-gnu-0.4.0
    flate2-1.0.25                ryu-1.0.11              winapi-util-0.1.5
    glob-0.3.0                   scratch-1.0.2           winapi-x86_64-pc-windows-gnu-0.4.0
    itoa-1.0.4                   serde-1.0.148
    jobserver-0.1.25             serde_derive-1.0.148

After:

    bitflags-1.3.2               os_str_bytes-6.4.1      unicode-ident-1.0.5
    cc-1.0.77                    proc-macro2-1.0.47      unicode-width-0.1.10
    clap-4.0.29                  quote-1.0.21            winapi-0.3.9
    clap_lex-0.3.0               scratch-1.0.2           winapi-i686-pc-windows-gnu-0.4.0
    codespan-reporting-0.11.1    syn-1.0.105             winapi-util-0.1.5
    once_cell-1.16.0             termcolor-1.1.3         winapi-x86_64-pc-windows-gnu-0.4.0
2022-12-02 22:57:32 -08:00
David Tolnay
dcbc8773d5
Add buck2 CI 2022-12-01 22:28:47 -08:00
David Tolnay
f1d7bff5ba
Require explicit edition on all Buck targets 2022-06-17 23:25:32 -07:00
David Tolnay
b828c0038e
Replace half-baked repository_os logic with get_host_triple 2022-04-27 14:41:05 -07:00
David Tolnay
e31ca999d1
Pull in my landed edition-related PRs from Bazel rules_rust 2022-04-25 18:29:03 -07:00
David Tolnay
95ff4822aa
Remove default value of vendor's cargo_version attribute 2022-04-24 11:17:13 -07:00
David Tolnay
3ebcb56b20
Compute target triple as {arch}-{os} 2022-04-24 10:30:31 -07:00
David Tolnay
d42f229646
Rearrange target_triple logic to highlight matching on os then arch 2022-04-24 10:22:33 -07:00
David Tolnay
57965873b3
Format vendor.bzl with buildifier 2022-04-24 10:19:49 -07:00
David Tolnay
2b3edb057c
More specific is_arm -> is_aarch64 in bazel vendor script 2022-04-24 10:18:30 -07:00
Snow Pettersen
bd751097cd fix arm check 2022-04-24 08:39:48 -04:00
Snow Pettersen
b433f9a792 param 2022-04-19 13:29:12 -04:00
Snow Pettersen
bb72157b29 bazel: support resolving arm triple 2022-04-19 13:23:39 -04:00
David Tolnay
e09caa6a1f
Enforce edition on all Bazel targets 2022-04-10 18:07:47 -07:00
Marcel Hlopko
0ad4fe5543 Migrate cxx for bazelbuild/rules_rust#591 2021-10-26 08:16:00 +02:00
David Tolnay
9846f3beb3
Pull in newer Bazel rules_rust 2021-10-05 17:35:57 -04:00
David Tolnay
5e0f8c36af
Merge pull request #916 from dtolnay/bazeledition
Remove rules that override rules_rust's default edition
2021-08-14 13:15:10 -07:00
David Tolnay
0d2ccea671
Format Bazel bzl files with buildifier 2021-08-14 13:11:01 -07:00
David Tolnay
4309c43a5b
Remove rules that override rules_rust's default edition 2021-08-14 13:09:16 -07:00
David Tolnay
66bac528d2
Buck: build and execute proc-macro2 build script 2021-08-14 12:55:10 -07:00
David Tolnay
1d92859ae7
Bazel: build and execute proc-macro2 build script 2021-08-14 12:03:11 -07:00
Carlo Contavalli
4fbb797eec bazel: don't use cargo in $PATH, make the build hermetic.
Background:
tools/bazel/vendor is just running 'cargo', hoping to find it somewhere
in $PATH.

Problem:
rules_rust try to be hermetic, and not use the cargo of the system, but
the cargo of the toolchain installed.
This means that if the cargo on the system is different from the cargo
used by cxx.rs, or the system does not have a cargo at all, bad things
will happen when using cxx.rs.

In this change:
use the recommended way to find/install the tool. Thanks to Andre in the
bazel rust slack channel for pointers and help.
2021-07-01 18:25:50 +00:00
Marcel Hlopko
ea34e6350c Make rust_cxx_bridge usable from other repositories 2021-02-01 21:20:53 +01:00
Andre Brisco
6adcf7d9a4 Fixed typo 2021-01-27 11:27:03 -08:00
Andre Brisco
5d3f36c8af Updated Bazel Rust rules version 2021-01-27 09:27:20 -08:00
David Tolnay
36731f8f53
Disambiguate symlink argument names
Mirrors https://github.com/rust-lang/rust/pull/79060.
2020-11-14 15:19:05 -08:00
David Tolnay
e3cdbd4ccd
Fix testing for symlink denied on initial builds 2020-11-14 15:11:52 -08:00
Jan Haller
595ac27632 Fix Windows symlink test to give reproducible error messages
After a `git clone -c core.symlinks=false` and `cargo test`, the script outputs a Git error as expected.
When running `cargo test` again, the error message changes to "symlink support needs to be enabled".

The test is done for an already existing directory, and the Windows mklink command _fails_ when the symlink exists already.
This commit deletes the link prior to the symlink creation.
2020-10-13 22:48:08 +02:00
David Tolnay
c9c197bff9
Try to detect symlinking disabled on Windows 2020-10-11 03:49:37 -07:00