Skip to content

Commit

Permalink
Update cc crate to 1.0.37
Browse files Browse the repository at this point in the history
This change updates the cc crate to version 1.0.37.

Import subrepo cc/:cc at cbf6d2f1312b6be22a7a363cf5c2a02acabc531f
  • Loading branch information
d-e-s-o committed May 25, 2019
1 parent 82cf43d commit b637d52
Show file tree
Hide file tree
Showing 17 changed files with 453 additions and 287 deletions.
63 changes: 0 additions & 63 deletions cc/.travis.yml

This file was deleted.

8 changes: 2 additions & 6 deletions cc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cc"
version = "1.0.28"
version = "1.0.37"
authors = ["Alex Crichton <[email protected]>"]
license = "MIT/Apache-2.0"
repository = "https://github.com/alexcrichton/cc-rs"
Expand All @@ -13,13 +13,9 @@ code.
"""
keywords = ["build-dependencies"]
readme = "README.md"
categories = ["development-tools"]
categories = ["development-tools::build-utils"]
exclude = ["/.travis.yml", "/appveyor.yml"]

[badges]
travis-ci = { repository = "alexcrichton/cc-rs" }
appveyor = { repository = "alexcrichton/cc-rs" }

[dependencies]
rayon = { version = "1.0", optional = true }

Expand Down
6 changes: 3 additions & 3 deletions cc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

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

[![Build Status](https://travis-ci.org/alexcrichton/cc-rs.svg?branch=master)](https://travis-ci.org/alexcrichton/cc-rs)
[![Build status](https://ci.appveyor.com/api/projects/status/onu270iw98h81nwv?svg=true)](https://ci.appveyor.com/project/alexcrichton/cc-rs)
[![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)

[Documentation](https://docs.rs/cc)

Expand Down Expand Up @@ -77,6 +76,7 @@ number of different environment variables.
certain `TARGET`s, it also is assumed to know about other flags (most
common is `-fPIC`).
* `AR` - the `ar` (archiver) executable to use to build the static library.
* `CRATE_CC_NO_DEFAULTS` - the default compiler flags may cause conflicts in some cross compiling scenarios. Setting this variable will disable the generation of default compiler flags.

Each of these variables can also be supplied with certain prefixes and suffixes,
in the following prioritized order:
Expand All @@ -88,7 +88,7 @@ in the following prioritized order:

If none of these variables exist, cc-rs uses built-in defaults

In addition to the the above optional environment variables, `cc-rs` has some
In addition to the above optional environment variables, `cc-rs` has some
functions with hard requirements on some variables supplied by [cargo's
build-script driver][cargo] that it has the `TARGET`, `OUT_DIR`, `OPT_LEVEL`,
and `HOST` variables.
Expand Down
55 changes: 0 additions & 55 deletions cc/appveyor.yml

This file was deleted.

101 changes: 101 additions & 0 deletions cc/azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
trigger:
- master

jobs:
- job: min_linux
pool:
vmImage: ubuntu-16.04
displayName: Minimum Rust (Linux)
variables:
TOOLCHAIN: 1.16.0
steps:
- template: ci/azure-install-rust.yml
- script: cargo build

- job: min_Windows
pool:
vmImage: vs2017-win2016
displayName: Minimum Rust (Windows)
variables:
TOOLCHAIN: 1.16.0
steps:
- template: ci/azure-install-rust.yml
- script: cargo build

- job: Linux
pool:
vmImage: ubuntu-16.04
steps:
- template: ci/azure-steps.yml
strategy:
matrix:
x86_64:
TARGET: x86_64-unknown-linux-gnu
i686:
TARGET: i686-unknown-linux-gnu
x86_64-beta:
TARGET: x86_64-unknown-linux-gnu
TOOLCHAIN: beta
x86_64-nightly:
TARGET: x86_64-unknown-linux-gnu
TOOLCHAIN: nightly

- job: macOS
pool:
vmImage: macos-10.13
steps:
- template: ci/azure-steps.yml
strategy:
matrix:
x86_64:
TARGET: x86_64-apple-darwin
aarch64-ios:
TARGET: aarch64-apple-ios
NO_RUN: --no-run

- job: Windows_vs2019
pool:
vmImage: windows-2019
steps:
- template: ci/azure-steps.yml
strategy:
matrix:
x86_64-msvc:
TARGET: x86_64-pc-windows-msvc

- job: Windows_vs2017
pool:
vmImage: vs2017-win2016
steps:
- template: ci/azure-steps.yml
strategy:
matrix:
x86_64-msvc:
TARGET: x86_64-pc-windows-msvc
i686-msvc:
TARGET: i686-pc-windows-msvc
x86_64-gnu:
TARGET: x86_64-pc-windows-gnu
i686-gnu:
TARGET: i686-pc-windows-gnu

- job: Windows_vs2015
pool:
vmImage: vs2015-win2012r2
steps:
- template: ci/azure-steps.yml
strategy:
matrix:
x86_64-msvc:
TARGET: x86_64-pc-windows-msvc
i686-msvc:
TARGET: i686-pc-windows-msvc

- job: docs
steps:
- template: ci/azure-install-rust.yml
- script: cargo doc --no-deps --all-features
- script: curl -LsSf https://git.io/fhJ8n | rustc - && (cd target/doc && ../../rust_out)
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
env:
GITHUB_DEPLOY_KEY: $(GITHUB_DEPLOY_KEY)
24 changes: 24 additions & 0 deletions cc/ci/azure-install-rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
steps:
- bash: |
set -e
toolchain=$TOOLCHAIN
if [ "$toolchain" = "" ]; then
toolchain=stable
fi
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $toolchain
echo "##vso[task.prependpath]$HOME/.cargo/bin"
displayName: Install rust (unix)
condition: ne( variables['Agent.OS'], 'Windows_NT' )
- script: |
IF "%TOOLCHAIN%"=="" (SET TOOLCHAIN=stable-%TARGET%)
curl -sSf -o rustup-init.exe https://win.rustup.rs
rustup-init.exe -y --default-toolchain %TOOLCHAIN%
echo ##vso[task.prependpath]%USERPROFILE%\.cargo\bin
displayName: Install rust (windows)
condition: eq( variables['Agent.OS'], 'Windows_NT' )
- script: |
rustc -Vv
cargo -V
displayName: Query rust and cargo versions
21 changes: 21 additions & 0 deletions cc/ci/azure-steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
steps:
- template: azure-install-rust.yml
- bash: rustup target add $TARGET
displayName: Install Rust target

- bash: sudo apt-get install g++-multilib
condition: eq( variables['Agent.OS'], 'Linux' )
displayName: Install g++-multilib

- script: cargo build
displayName: "Normal build"
- bash: cargo test $NO_RUN -- --test-threads 1
displayName: "Crate tests"
- bash: cargo test $NO_RUN --features parallel -- --test-threads 1
displayName: "Crate tests (parallel)"
- bash: cargo test $NO_RUN --manifest-path cc-test/Cargo.toml --target $TARGET
displayName: "cc-test tests"
- bash: cargo test $NO_RUN --manifest-path cc-test/Cargo.toml --target $TARGET --features parallel
displayName: "cc-test tests (parallel)"
- bash: cargo test $NO_RUN --manifest-path cc-test/Cargo.toml --target $TARGET --release
displayName: "cc-test tests (release)"
4 changes: 2 additions & 2 deletions cc/src/com.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ use std::ops::Deref;
use std::os::windows::ffi::{OsStrExt, OsStringExt};
use std::ptr::null_mut;
use std::slice::from_raw_parts;
use winapi::CoInitializeEx;
use winapi::IUnknown;
use winapi::Interface;
use winapi::BSTR;
use winapi::CoInitializeEx;
use winapi::COINIT_MULTITHREADED;
use winapi::{SysFreeString, SysStringLen};
use winapi::IUnknown;
use winapi::{HRESULT, S_FALSE, S_OK};

pub fn initialize() -> Result<(), HRESULT> {
Expand Down
Loading

0 comments on commit b637d52

Please sign in to comment.