| 1 |
# Copyright © 2025 Google |
| 2 |
# SPDX-License-Identifier: MIT |
| 3 |
|
| 4 |
project( |
| 5 |
'errno', |
| 6 |
'rust', |
| 7 |
version : '0.3.12', |
| 8 |
license : 'MIT OR Apache-2.0', |
| 9 |
meson_version : '>= 1.7.0', |
| 10 |
) |
| 11 |
|
| 12 |
os_deps = [] |
| 13 |
libc = subproject('libc-0.2-rs').get_variable('lib') |
| 14 |
if host_machine.system() == 'windows' |
| 15 |
os_deps += subproject('windows-sys-0.6-rs').get_variable('lib') |
| 16 |
endif |
| 17 |
|
| 18 |
lib = static_library( |
| 19 |
'libc_errno', |
| 20 |
'src/lib.rs', |
| 21 |
override_options : ['rust_std=2018', 'build.rust_std=2018', 'warning_level=0'], |
| 22 |
link_with: [libc] + os_deps, |
| 23 |
rust_abi : 'rust', |
| 24 |
) |
| 25 |
|
| 26 |
dep_errno = declare_dependency( |
| 27 |
link_with : [lib] |
| 28 |
) |