diff options
author | Bert Belder <bertbelder@gmail.com> | 2020-03-23 20:28:18 +0100 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2020-03-23 20:31:29 +0100 |
commit | 449dbe5272aef429067abe3226d30f640fd3bac3 (patch) | |
tree | 6b12463fd53cbae14cf2e7ef2be4dda2f5c5d96a | |
parent | d143fe61bc61030c0874c091aa0dd8bf5141b5fa (diff) |
Statically link the C runtime library on Windows (#4469)
-rw-r--r-- | .cargo/config | 2 | ||||
-rw-r--r-- | .github/workflows/ci.yml | 14 | ||||
-rw-r--r-- | .gitignore | 2 |
3 files changed, 10 insertions, 8 deletions
diff --git a/.cargo/config b/.cargo/config new file mode 100644 index 000000000..ac2b23f81 --- /dev/null +++ b/.cargo/config @@ -0,0 +1,2 @@ +[target.x86_64-pc-windows-msvc] +rustflags = ["-C", "target-feature=+crt-static"] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 666db1dc7..79bd8bdaa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,7 +54,7 @@ jobs: if: startsWith(matrix.config.os, 'ubuntu') && matrix.config.kind == 'test_release' && startsWith(github.ref, 'refs/tags/') && github.repository == 'denoland/deno' run: | mkdir -p target/release - tar --exclude=.cargo --exclude=".git*" --exclude=target --exclude=deno_typescript/typescript/tests --exclude=third_party/cpplint --exclude=third_party/node_modules --exclude=third_party/python_packages --exclude=third_party/prebuilt -czvf target/release/deno_src.tar.gz -C .. deno + tar --exclude=.cargo_home --exclude=".git*" --exclude=target --exclude=deno_typescript/typescript/tests --exclude=third_party/cpplint --exclude=third_party/node_modules --exclude=third_party/python_packages --exclude=third_party/prebuilt -czvf target/release/deno_src.tar.gz -C .. deno - name: Install rust uses: hecrj/setup-rust-action@v1 @@ -90,11 +90,11 @@ jobs: - name: Configure cargo data directory # After this point, all cargo registry and crate data is stored in - # $GITHUB_WORKSPACE/.cargo. This allows us to cache only the files that - # are needed during the build process. Additionally, this works around - # a bug in the 'cache' action that causes directories outside of the - # workspace dir to be saved/restored incorrectly. - run: echo "::set-env name=CARGO_HOME::$(pwd)/.cargo" + # $GITHUB_WORKSPACE/.cargo_home. This allows us to cache only the files + # that are needed during the build process. Additionally, this works + # around a bug in the 'cache' action that causes directories outside of + # the workspace dir to be saved/restored incorrectly. + run: echo "::set-env name=CARGO_HOME::$(pwd)/.cargo_home" - name: Cache uses: actions/cache@master @@ -104,7 +104,7 @@ jobs: # so we cache only those subdirectories of target/{debug|release} that # contain the build output for crates that come from the registry. path: |- - .cargo + .cargo_home target/*/.* target/*/build target/*/deps diff --git a/.gitignore b/.gitignore index ce0e778c3..eff476d86 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,7 @@ *.pyc *.swp -/.cargo/ +/.cargo_home/ /.idea/ /.vscode/ gclient_config.py_entries |