summaryrefslogtreecommitdiff
path: root/build.rs
Commit message (Collapse)AuthorAgeFilesLines
* Report the actual error when failing to get the rustc versionbjorn32022-11-111-6/+10
| | | | This should help with pinpointing the issue in rust-lang/crater#663.
* Enable `libc_const_extern_fn` implicitly from Rust 1.62Yuki Okushi2022-06-081-4/+11
|
* Use static_assert_eq macroest312022-03-241-3/+3
| | | | | | | | This macro bases on the static_assert_size macro from the rust compiler. Its advantage is greater compatibility with older rust versions as well as better error messages on a mismatch, as both numbers are printed. The assert macro does not print the mismatching numbers as it only gets the bool from the == comparison.
* Create optionally-available __int128 typedefs and use them for ARM64 ↵Aria Beingessner2022-03-231-0/+10
| | | | | | | | | | | | | definitions. This adds the following types to fixed_width_ints behind appropriate platform cfgs: * __int128 * __int128_t * __uint128 * __uint128_t and user_fpsimd_struct to arm64 android and linux.
* Revert "Fix invalid freebsd version selection"Alan Somers2021-12-101-5/+7
| | | | | | | | This reverts commit 53e79b886bf4e4d3682ae6669e3585b3586e5255. PR #2581 unintentionally changed libc's bindings from the FreeBSD 11 ABI to the native ABI of the build host. This is causing breakage for many downstream crates.
* Fix invalid freebsd version selectionGuillaume Gomez2021-12-051-7/+5
|
* Detect FreeBSD 14Yuki Okushi2021-11-171-0/+2
|
* linux: Add open_how and related flagsFanael Linithien2021-11-041-0/+5
|
* Use ptr::addr_of when availableNoa2021-11-011-0/+4
|
* Don't unconditionally link libiconv on macOS.Geoffry Song2021-04-281-7/+0
| | | | | This adds `#[link(name = "iconv")]` to just the iconv symbols so that the library is only linked if the symbols are used.
* Fix styleYuki Okushi2021-04-061-4/+2
|
* Specify `cargo:rerun-if-changed=build.rs` to avoid re-buildingYuki Okushi2021-04-051-0/+3
|
* Add bindings for iconv callsAlexander Batischev2021-02-111-0/+7
| | | | | | | | | | | | | | | | | | FreeBSD-likes all implement iconv: - DragonflyBSD: https://github.com/DragonFlyBSD/DragonFlyBSD/blob/bbb35c81f71fe2a0880a1f8bb77876ee98b63338/include/iconv.h - FreeBSD: https://github.com/freebsd/freebsd-src/blob/a6dc68c0e0f8a24ffaf0b4e78e58141ef7897047/include/iconv.h NetBSD-likes: - NetBSD: https://github.com/NetBSD/src/blob/81a39f60870b617d7fca299c126de6553d78cc5a/include/iconv.h - OpenBSD doesn't implement it macOS: apparently ships a conforming implementation as a separate library: https://stackoverflow.com/questions/57734434/libiconv-or-iconv-undefined-symbol-on-mac-osx/57734435#57734435 Linux: - glibc: https://sourceware.org/git/?p=glibc.git;a=blob;f=iconv/iconv.h;h=fdddf53d99c3046ef9c280db01a425c2f499043e;hb=HEAD - musl: https://git.musl-libc.org/cgit/musl/tree/include/iconv.h?id=455f96857f91d14e193219ca00969354a981c09c
* Add DevkitPPC supportDark Kirb2020-08-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DevkitPPC does not support unix sockets natively, meaning that bindings to these functions was removed for powerpc targets with "nintendo" as vendor. Suggested target json files: Nintendo Gamecube: ``` { "arch": "powerpc", "data-layout": "E-m:e-p:32:32-i64:64-n32", "dynamic-linking": false, "env": "newlib", "executables": true, "has-elf-tls": false, "has-rpath": true, "linker-flavor": "gcc", "llvm-target": "powerpc-eabi", "max-atomic-width": 32, "os": "dolphin", "target-c-int-width": "32", "target-endian": "big", "target-family": "unix", "target-mcount": "_mcount", "target-pointer-width": "32", "vendor": "nintendo" } ``` Nintendo Wii: ``` { "arch": "powerpc", "data-layout": "E-m:e-p:32:32-i64:64-n32", "dynamic-linking": false, "env": "newlib", "executables": true, "has-elf-tls": false, "has-rpath": true, "linker-flavor": "gcc", "llvm-target": "powerpc-eabi", "max-atomic-width": 32, "os": "revolution", "target-c-int-width": "32", "target-endian": "big", "target-family": "unix", "target-mcount": "_mcount", "target-pointer-width": "32", "vendor": "nintendo" } ```
* Fix build.rs failing with a rustc built from a tarballAaron Hill2019-11-201-3/+10
| | | | Fixes #1601
* Run 'cargo fmt'Aaron Hill2019-10-291-2/+4
|
* Panic if const-extern-fn is not used on nightlyAaron Hill2019-10-291-4/+12
|
* Add Linux testAaron Hill2019-10-281-0/+5
|
* Add FreeBSD10 supportgnzlbg2019-09-161-1/+6
| | | | | This adds libc-test support for Freebsd10 and a CI build job that tests FreeBSD10 with LIBC_CI only.
* Do not deny warnings by default.gnzlbg2019-08-161-1/+5
| | | | | libc currently denies all warnings by default. This commit denies warnings only when libc is built in CI.
* Always pass freebsd11 - otherwise cross-compiling to FreeBSD failsgnzlbg2019-08-151-8/+1
|
* Fix FreeBSD buildgnzlbg2019-08-141-9/+17
|
* Properly define freebsd11 attributeLuca Pizzamiglio2019-07-281-0/+3
|
* Add support for FreeBSD CURRENT (aka freebsd13)Luca Pizzamiglio2019-07-281-0/+4
| | | | | | | | Currently, libc supports and detects freebsd11 and freebsd13 Unknown versions, like freebsd13, is treated as freebsd11. This patch solve the issues, detecting freebsd13 and treating it like freebsd12. Inverting the logic not(freebsd12) -> freebsd11 where possible
* Remove use of `unstable` featureJoe Richey2019-07-141-2/+1
|
* Add libc_thread_local cfg and unstable featureJoe Richey2019-07-101-5/+10
|
* Add a FreeBSD 12 build job and test FreeBSD12 APIsgnzlbg2019-05-241-0/+29
| | | | | | | | | | | | | | | | | | | | | This commits adds a second FreeBSD 12 build job, and splits the implementation of the FreeBSD module into two modules, one for FreeBSD 11, and one for FreeBSD 12. The FreeBSD 11 module is compiled always by default, and is mostly forward compatible with FreeBSD 12 systems. The FreeBSD 12 module is only built for now in libc's CI, and uses FreeBSD 12 data types and APIs, linking to symbols that are only available in FreeBSD 12. Basically, when LIBC_CI env variable is defined, and the host system is a FreeBSD 12 system, then the FreeBSD 12 module is automatically built and tested. Conditional compilation is done using a `cfg(freebsd12)` flag. This commit also re-enables many tests, and documents why some remain disabled.
* Deprecate `use_std` cargo feature: use `std` instead .gnzlbg2019-05-241-0/+7
| | | | Related to #657 .
* Fix build on all platformsgnzlbg2019-02-071-6/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR fixes the build on all platforms and all Rust version down to the minimum Rust version supported by libc: Rust 1.13.0. The `build.rs` is extended with logic to detect the newer Rust features used by `libc` since Rust 1.13.0: * Rust 1.19.0: `untagged_unions`. APIs using untagged unions are gated on `cfg(libc_unions)` and not available on older Rust versions. * Rust 1.25.0: `repr(align)`. Because `repr(align)` cannot be parsed by older Rust versions, all uses of `repr(align)` are split into `align.rs` and `no_align.rs` modules, which are gated on the `cfg(libc_align)` at the top level. These modules sometimes contain macros that are expanded at the top level to avoid privacy issues (`pub(crate)` is not available in older Rust versions). Closes #1242 . * Rust : `const` `mem::size_of`. These uses are worked around with hardcoded constants on older Rust versions. Also, `repr(packed)` structs cannot automatically `derive()` some traits like `Debug`. These have been moved into `s_no_extra_traits!` and the lint of missing `Debug` implementations on public items is silenced for these. We can manually implement the `extra_traits` for these in a follow up PR. This is tracked in #1243. Also, `extra_traits` does not enable `align` manually anymore. Since `f64::to_bits` is not available in older Rust versions, its usage has been replaced with a `transmute` to an `u64` which is what that method does under the hood. Closes #1232 .
* core::ffi::c_void is available since rustc 1.30Mike Hommey2018-11-211-1/+1
|
* Re-export core::ffi::c_void if supportedIsaac Woods2018-09-181-0/+35