Skip to content

Commit 9091de4

Browse files
committed
Update cc crate to 1.0.48
This change updates the cc crate to version 1.0.48. Import subrepo cc/:cc at be9f2c1ae05b336aa3d07a4cbefdc1d88a3d8a91
1 parent 49be10a commit 9091de4

20 files changed

+517
-328
lines changed

cc/.github/workflows/main.yml

+124
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
name: CI
2+
on: [push, pull_request]
3+
4+
jobs:
5+
test:
6+
name: Test
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
build: [stable, beta, nightly, linux32, macos, aarch64-ios, win32, win64, mingw32, mingw64, windows-2016]
11+
include:
12+
- build: stable
13+
os: ubuntu-latest
14+
rust: stable
15+
target: x86_64-unknown-linux-gnu
16+
- build: beta
17+
os: ubuntu-latest
18+
rust: beta
19+
target: x86_64-unknown-linux-gnu
20+
- build: nightly
21+
os: ubuntu-latest
22+
rust: nightly
23+
target: x86_64-unknown-linux-gnu
24+
- build: linux32
25+
os: ubuntu-latest
26+
rust: stable
27+
target: i686-unknown-linux-gnu
28+
- build: macos
29+
os: macos-latest
30+
rust: stable
31+
target: x86_64-apple-darwin
32+
- build: aarch64-ios
33+
os: macos-latest
34+
rust: stable
35+
target: aarch64-apple-ios
36+
no_run: --no-run
37+
- build: win32
38+
os: windows-2016
39+
rust: stable-i686-msvc
40+
target: i686-pc-windows-msvc
41+
- build: win64
42+
os: windows-latest
43+
rust: stable
44+
target: x86_64-pc-windows-msvc
45+
- build: mingw32
46+
os: windows-latest
47+
rust: stable-i686-gnu
48+
target: i686-pc-windows-gnu
49+
- build: mingw64
50+
os: windows-latest
51+
rust: stable-x86_64-gnu
52+
target: x86_64-pc-windows-gnu
53+
- build: windows-2016
54+
os: windows-2016
55+
rust: stable-x86_64
56+
target: x86_64-pc-windows-msvc
57+
steps:
58+
- uses: actions/checkout@master
59+
- name: Install Rust (rustup)
60+
run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
61+
if: matrix.os != 'macos-latest'
62+
shell: bash
63+
- name: Install Rust (macos)
64+
run: |
65+
curl https://sh.rustup.rs | sh -s -- -y
66+
echo "##[add-path]$HOME/.cargo/bin"
67+
if: matrix.os == 'macos-latest'
68+
- run: rustup target add ${{ matrix.target }}
69+
- name: Install g++-multilib
70+
run: |
71+
set -e
72+
# Remove the ubuntu-toolchain-r/test PPA, which is added by default.
73+
# Some packages were removed, and this is causing the g++multilib
74+
# install to fail. Similar issue:
75+
# https://github.com/scikit-learn/scikit-learn/issues/13928.
76+
sudo add-apt-repository --remove ppa:ubuntu-toolchain-r/test
77+
sudo apt-get install g++-multilib
78+
if: matrix.build == 'linux32'
79+
- run: cargo build
80+
- run: cargo test ${{ matrix.no_run }}
81+
- run: cargo test ${{ matrix.no_run }} --features parallel
82+
- run: cargo test ${{ matrix.no_run }} --manifest-path cc-test/Cargo.toml --target ${{ matrix.target }}
83+
- run: cargo test ${{ matrix.no_run }} --manifest-path cc-test/Cargo.toml --target ${{ matrix.target }} --features parallel
84+
- run: cargo test ${{ matrix.no_run }} --manifest-path cc-test/Cargo.toml --target ${{ matrix.target }} --release
85+
86+
msrv:
87+
name: MSRV
88+
runs-on: ${{ matrix.os }}
89+
strategy:
90+
matrix:
91+
os: [ubuntu-latest, windows-latest]
92+
steps:
93+
- uses: actions/checkout@master
94+
- name: Install Rust
95+
run: rustup update 1.31.0 --no-self-update && rustup default 1.31.0
96+
shell: bash
97+
- run: cargo build
98+
99+
rustfmt:
100+
name: Rustfmt
101+
runs-on: ubuntu-latest
102+
steps:
103+
- uses: actions/checkout@master
104+
- name: Install Rust
105+
run: rustup update stable && rustup default stable && rustup component add rustfmt
106+
- run: cargo fmt -- --check
107+
108+
publish_docs:
109+
name: Publish Documentation
110+
runs-on: ubuntu-latest
111+
steps:
112+
- uses: actions/checkout@master
113+
- name: Install Rust
114+
run: rustup update stable && rustup default stable
115+
- name: Build documentation
116+
run: cargo doc --no-deps --all-features
117+
- name: Publish documentation
118+
run: |
119+
cd target/doc
120+
git init
121+
git add .
122+
git -c user.name='ci' -c user.email='ci' commit -m init
123+
git push -f -q https://git:${{ secrets.github_token }}@github.com/${{ github.repository }} HEAD:gh-pages
124+
if: github.event_name == 'push' && github.event.ref == 'refs/heads/master'

cc/Cargo.toml

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cc"
3-
version = "1.0.40"
3+
version = "1.0.48"
44
authors = ["Alex Crichton <alex@alexcrichton.com>"]
55
license = "MIT/Apache-2.0"
66
repository = "https://github.com/alexcrichton/cc-rs"
@@ -15,12 +15,14 @@ keywords = ["build-dependencies"]
1515
readme = "README.md"
1616
categories = ["development-tools::build-utils"]
1717
exclude = ["/.travis.yml", "/appveyor.yml"]
18+
edition = "2018"
1819

1920
[dependencies]
20-
rayon = { version = "1.0", optional = true }
21+
num_cpus = { version = "1.10", optional = true }
22+
jobserver = { version = "0.1.16", optional = true }
2123

2224
[features]
23-
parallel = ["rayon"]
25+
parallel = ["num_cpus", "jobserver"]
2426

2527
[dev-dependencies]
26-
tempdir = "0.3"
28+
tempfile = "3"

cc/README.md

-8
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
A library to compile C/C++/assembly into a Rust library/application.
44

5-
[![Build Status](https://dev.azure.com/alexcrichton/cc-rs/_apis/build/status/alexcrichton.cc-rs?branchName=master)](https://dev.azure.com/alexcrichton/cc-rs/_build/latest?definitionId=5&branchName=master)
6-
75
[Documentation](https://docs.rs/cc)
86

97
A simple library meant to be used as a build dependency with Cargo packages in
@@ -28,8 +26,6 @@ Next up, you'll want to write a build script like so:
2826
```rust,no_run
2927
// build.rs
3028
31-
extern crate cc;
32-
3329
fn main() {
3430
cc::Build::new()
3531
.file("foo.c")
@@ -143,8 +139,6 @@ required varies per platform, but there are three broad categories:
143139
`Build`:
144140

145141
```rust,no_run
146-
extern crate cc;
147-
148142
fn main() {
149143
cc::Build::new()
150144
.cpp(true) // Switch to C++ library compilation.
@@ -163,8 +157,6 @@ linked to the crate target.
163157
on `Build` (currently for GNU/Clang toolchains only):
164158

165159
```rust,no_run
166-
extern crate cc;
167-
168160
fn main() {
169161
cc::Build::new()
170162
// Switch to CUDA C++ library compilation using NVCC.

cc/azure-pipelines.yml

-105
This file was deleted.

cc/cc-test/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name = "cc-test"
33
version = "0.1.0"
44
authors = ["Alex Crichton <alex@alexcrichton.com>"]
5+
edition = "2018"
56

67
[lib]
78
name = "cc_test"

cc/cc-test/build.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
extern crate cc;
2-
31
use std::env;
42
use std::fs;
53
use std::path::PathBuf;

cc/cc-test/tests/all.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
extern crate cc_test;
2-
31
use cc_test::*;
42

53
#[link(name = "OptLinkage", kind = "static")]

cc/ci/azure-install-rust.yml

-38
This file was deleted.

cc/ci/azure-steps.yml

-28
This file was deleted.

0 commit comments

Comments
 (0)