Build 32-bit executables on 32-bit appveyor builds
This commit is contained in:
parent
4689cadf9d
commit
ae07d2d6e4
2 changed files with 9 additions and 3 deletions
|
|
@ -2,7 +2,8 @@ build: false
|
|||
install:
|
||||
# Install rust
|
||||
- appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
|
||||
- rustup-init -yv --default-toolchain stable
|
||||
- IF "%PLATFORM%" == "x86" rustup-init -y --default-toolchain stable --default-host i686-pc-windows-msvc
|
||||
- IF "%PLATFORM%" == "x64" rustup-init -y --default-toolchain stable --default-host x86_64-pc-windows-msvc
|
||||
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
|
||||
- rustc -vV
|
||||
- cargo -vV
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ const DYLIB_EXTENSION: &'static str = "so";
|
|||
#[cfg(windows)]
|
||||
const DYLIB_EXTENSION: &'static str = "dll";
|
||||
|
||||
const BUILD_TARGET: &'static str = env!("BUILD_TARGET");
|
||||
|
||||
struct LanguageRepo {
|
||||
name: String,
|
||||
path: PathBuf,
|
||||
|
|
@ -156,8 +158,8 @@ impl Loader {
|
|||
.cpp(true)
|
||||
.opt_level(2)
|
||||
.cargo_metadata(false)
|
||||
.target(env!("BUILD_TARGET"))
|
||||
.host(env!("BUILD_TARGET"));
|
||||
.target(BUILD_TARGET)
|
||||
.host(BUILD_TARGET);
|
||||
let compiler = config.get_compiler();
|
||||
let mut command = Command::new(compiler.path());
|
||||
for (key, value) in compiler.env() {
|
||||
|
|
@ -165,6 +167,9 @@ impl Loader {
|
|||
}
|
||||
|
||||
if cfg!(windows) {
|
||||
if !BUILD_TARGET.contains("64") {
|
||||
command.env("Platform", "x86");
|
||||
}
|
||||
command
|
||||
.args(&["/nologo", "/LD", "/I"])
|
||||
.arg(header_path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue