Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CMake, use 'NOT WIN32' instead of 'UNIX' (#2075)
### Description of changes: CMake condition on `UNIX` should instead be `NOT WIN32` b/c some unix-like operating systems do not identify with "UNIX". ### Callout The "UNIX" variable appears to not be set on illumos, which leads to build failures like this: https://github.com/rust-lang/rustup/actions/runs/12384929706/job/34570334451#step:17:584 ### Testing I verified locally that with this change the build of `aws-lc-sys` for `x86_64-unknown-illumos` succeeds. <details> ``` ❯ cargo clean && cross build --target x86_64-unknown-illumos Removed 215 files, 74.6MiB total [+] Building 7.1s (8/8) FINISHED docker-container:container => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 843B 0.0s => [internal] load metadata for ghcr.io/cross-rs/x86_64-unknown-illumos:main 0.3s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [1/3] FROM ghcr.io/cross-rs/x86_64-unknown-illumos:main@sha256:ff410dca255986b9bb06f74c466f5d032502951d49c4436b401c3d7acd17a0d3 0.0s => => resolve ghcr.io/cross-rs/x86_64-unknown-illumos:main@sha256:ff410dca255986b9bb06f74c466f5d032502951d49c4436b401c3d7acd17a0d3 0.0s => CACHED [2/3] RUN apt-get update && apt-get install --assume-yes --no-install-recommends gpg-agent software-properties-common && add-apt-repository --yes ppa:longsleep/golang-backports && apt-get update && apt-get install --assume-yes --no-install-recommends 0.0s => CACHED [3/3] RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable && . $HOME/.cargo/env && cargo install --force --locked bindgen-cli && mv $HOME/.cargo/bin/bindgen /usr/bin && rm -rf $HOME/.ca 0.0s => exporting to docker image format 6.7s => => exporting layers 0.0s => => exporting manifest sha256:e61a79c40bbd531f030688b9306e726757fb3b45ac9a62a81fced103d4c12344 0.0s => => exporting config sha256:6cc549d380a42123a4f54e820fd0d1b09817b446fc521540a6ad799c3bdb6c72 0.0s => => sending tarball 6.7s => importing to docker 0.0s Compiling libc v0.2.168 Compiling shlex v1.3.0 Compiling fs_extra v1.3.0 Compiling paste v1.0.15 Compiling dunce v1.0.5 Compiling jobserver v0.1.32 Compiling cc v1.2.3 Compiling cmake v0.1.52 Compiling aws-lc-sys v0.24.0 (/Users/justsmth/repos/aws-lc-rs/aws-lc-sys) warning: [email protected]: Building with: CMake warning: [email protected]: Symbol Prefix: Some("aws_lc_0_24_0") warning: [email protected]: CMAKE environment variable set: cmake warning: [email protected]: Generating bindings - external bindgen. Platform: x86_64-unknown-illumos warning: [email protected]: Compilation of 'c11.c' succeeded - Ok(["/target/x86_64-unknown-illumos/debug/build/aws-lc-sys-00266876999d9957/out/out-c11/7dfda64fdf5a526c-c11.o"]). warning: [email protected]: CC environment variable set: clang warning: [email protected]: CXX environment variable set: clang++ warning: [email protected]: Setting CFLAGS: "-O0 -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -std=c11 -I /Users/justsmth/repos/aws-lc-rs/aws-lc-sys/generated-include -I /Users/justsmth/repos/aws-lc-rs/aws-lc-sys/include -I /Users/justsmth/repos/aws-lc-rs/aws-lc-sys/aws-lc/include -I /Users/justsmth/repos/aws-lc-rs/aws-lc-sys/aws-lc/third_party/s2n-bignum/include -Wall -Wextra -Wno-unused-parameter -DBORINGSSL_IMPLEMENTATION=1 -DBORINGSSL_PREFIX=aws_lc_0_24_0" warning: [email protected]: CMAKE_TOOLCHAIN_FILE environment variable set: /opt/toolchain.cmake Finished `dev` profile [unoptimized + debuginfo] target(s) in 36.72s ``` </details> By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.
- Loading branch information