Skip to content
Snippets Groups Projects
Commit 9f153e97 authored by gnzlbg's avatar gnzlbg
Browse files

Patch mingw libraries for windows gnu targets

parent d4bb00a5
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@ documentation = "http://doc.rust-lang.org/libc"
keywords = ["libc", "ffi", "bindings", "operating", "system" ]
categories = ["external-ffi-bindings", "no-std", "os"]
build = "build.rs"
exclude = ["/ci/*", "/.travis.yml", "/appveyor.yml"]
exclude = ["/ci/*", "/azure-pipelines.yml"]
description = """
Raw FFI bindings to platform libraries like libc.
"""
......
trigger:
- master
variables:
- group: secrets
resources:
repositories:
- repository: rustinfra
type: github
name: rust-lang/simpleinfra
endpoint: rust-lang
trigger: ["master"]
pr: ["master"]
jobs:
- job: DockerLinux
......@@ -99,13 +107,13 @@ jobs:
matrix:
x86_64-pc-windows-gnu:
TARGET: x86_64-pc-windows-gnu
MSYS_BITS: 64
ARCH_BITS: 64
ARCH: x86_64
x86_64-pc-windows-msvc:
TARGET: x86_64-pc-windows-msvc
i686-pc-windows-gnu:
TARGET: i686-pc-windows-gnu
MSYS_BITS: 32
ARCH_BITS: 32
ARCH: i686
i686-pc-windows-msvc:
TARGET: i686-pc-windows-msvc
......@@ -118,7 +126,10 @@ jobs:
- script: sh ci/style.sh
displayName: Check style
- script: sh ci/dox.sh
displayName: Generate and upload documentation
displayName: Generate documentation
- template: azure-configs/static-websites.yml@rustinfra
parameters:
deploy_dir: target/doc
#- job: SemverLinux
# continueOnError: true
......
......@@ -8,19 +8,12 @@ this project.
First up, let's talk about the files in this directory:
* `run-travis.sh` - a shell script run by all Travis builders, this is
responsible for setting up the rest of the environment such as installing new
packages, downloading Rust target libraries, etc.
* `run-docker.sh` - a shell script run by most builders, it will execute
`run.sh` inside a Docker container configured for the target.
* `run.sh` - the actual script which runs tests for a particular architecture.
Called from the `run-travis.sh` script this will run all tests for the target
specified.
* `cargo-config` - Cargo configuration of linkers to use copied into place by
the `run-travis.sh` script before builds are run.
* `dox.sh` - script called from `run-travis.sh` on only the linux 64-bit nightly
Travis bots to build documentation for this crate.
* `dox.sh` - build the documentation of the crate and publish it to gh-pages.
* `landing-page-*.html` - used by `dox.sh` to generate a landing page for all
architectures' documentation.
......
......@@ -15,9 +15,10 @@ steps:
displayName: Install rust (unix)
condition: ne( variables['Agent.OS'], 'Windows_NT' )
- script: |
@echo on
if not defined TOOLCHAIN set TOOLCHAIN=nightly
rustup update %TOOLCHAIN%
rustup default %TOOLCHAIN%
rustup update %TOOLCHAIN%-%TARGET%
rustup default %TOOLCHAIN%-%TARGET%
displayName: Install rust (windows)
condition: eq( variables['Agent.OS'], 'Windows_NT' )
- script: |
......@@ -27,13 +28,31 @@ steps:
fi
condition: ne( variables['Agent.OS'], 'Windows_NT' )
displayName: Install target (unix)
- script: if defined TARGET rustup target add %TARGET%
- script: |
@echo on
if defined TARGET rustup target add %TARGET%
condition: eq( variables['Agent.OS'], 'Windows_NT' )
displayName: Install target (windows)
#- script: if defined MSYS_BITS for %%I in (crt2.o dllcrt2.o libmsvcrt.a) do xcopy /Y "C:\msys64\mingw%MSYS_BITS%\%ARCH%-w64-mingw32\lib\%%I" "C:\Program Files (x86)\Rust\lib\rustlib\%TARGET%\lib"
# condition: eq( variables['Agent.OS'], 'Windows_NT' )
# displayName: Fix MinGW (windows)
- script: |
@echo on
if "%ARCH%" == "i686" choco install mingw --x86 --force
condition: eq( variables['Agent.OS'], 'Windows_NT' )
displayName: Install MinGW32 (windows)
- bash: |
set -ex
gcc -print-search-dirs
find "C:\ProgramData\Chocolatey" -name "crt2*"
find "C:\ProgramData\Chocolatey" -name "dllcrt2*"
find "C:\ProgramData\Chocolatey" -name "libmsvcrt*"
condition: eq( variables['Agent.OS'], 'Windows_NT' )
displayName: Find GCC libraries (windows)
- script: |
@echo on
if not defined TOOLCHAIN set TOOLCHAIN=nightly
if defined ARCH_BITS for %%I in (crt2.o dllcrt2.o libmsvcrt.a) do xcopy /Y "C:\ProgramData\Chocolatey\lib\mingw\tools\install\mingw%ARCH_BITS%\%ARCH%-w64-mingw32\lib\%%I" "C:\Program Files\Rust\.rustup\toolchains\%TOOLCHAIN%-%TARGET%\lib\rustlib\%TARGET%\lib\%%I"
condition: eq( variables['Agent.OS'], 'Windows_NT' )
displayName: Fix MinGW (windows)
- bash: |
set -ex
rustc -Vv
cargo -V
......@@ -44,6 +63,11 @@ steps:
which rustup
displayName: Query rust and cargo versions
- script: |
@echo on
where gcc
condition: eq( variables['Agent.OS'], 'Windows_NT' )
displayName: Query gcc path
- bash: |
set -ex
cargo generate-lockfile
cargo generate-lockfile --manifest-path libc-test/Cargo.toml
......
......@@ -69,10 +69,3 @@ set -x
# Copy the licenses
cp LICENSE-* $TARGET_DOC_DIR/
# If we're on travis, not a PR, and on the right branch, publish!
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_BRANCH" = "master" ]; then
pip install ghp_import --install-option="--prefix=$HOME/.local"
"${HOME}/.local/bin/ghp-import" $TARGET_DOC_DIR
git push -qf "https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git" gh-pages
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment