diff options
author | Per Larsen <perlarsen@google.com> | 2023-06-28 03:00:00 +0000 |
---|---|---|
committer | Andrei Homescu <ahomescu@google.com> | 2023-10-31 02:53:30 +0000 |
commit | 702e1da04fe585b0a480bbf64d66d06cf78d5311 (patch) | |
tree | 401a8d6782704213170354856954392b41d737c4 | |
parent | 49258ba94dd0e0b9e87d7218bd1c1089e12f3aac (diff) | |
download | libc-702e1da04fe585b0a480bbf64d66d06cf78d5311.tar.gz |
Adding autogenerated Trusty makefile rules
Bug: 281857510
Test: build.py --skip-tests qemu-generic-arm64-test-debug
Change-Id: I4add15c850804d1352e577f4ca4b0388fd7e3182
-rw-r--r-- | cargo2rulesmk.json | 4 | ||||
-rw-r--r-- | patches/rules.mk.diff | 17 | ||||
-rw-r--r-- | rules.mk | 35 |
3 files changed, 56 insertions, 0 deletions
diff --git a/cargo2rulesmk.json b/cargo2rulesmk.json new file mode 100644 index 00000000..cce930ee --- /dev/null +++ b/cargo2rulesmk.json @@ -0,0 +1,4 @@ +{ + "patch": "patches/rules.mk.diff", + "module_add_implicit_deps": false +} diff --git a/patches/rules.mk.diff b/patches/rules.mk.diff new file mode 100644 index 00000000..c3310b80 --- /dev/null +++ b/patches/rules.mk.diff @@ -0,0 +1,17 @@ +diff --git a/rules.mk b/rules.mk +index 92f34db68..08cf2d6c3 100644 +--- a/rules.mk ++++ b/rules.mk +@@ -24,8 +24,12 @@ MODULE_RUSTFLAGS += \ + --cfg 'libc_ptr_addr_of' \ + --cfg 'libc_underscore_const_names' \ + --cfg 'libc_union' \ ++ -A unknown-lints \ + + MODULE_LIBRARY_DEPS := \ + external/rust/crates/rustc-std-workspace-core \ ++ trusty/user/base/lib/libcompiler_builtins-rust \ ++ trusty/user/base/lib/libcore-rust \ ++ trusty/user/base/lib/libc-trusty \ + + include make/library.mk diff --git a/rules.mk b/rules.mk new file mode 100644 index 00000000..08cf2d6c --- /dev/null +++ b/rules.mk @@ -0,0 +1,35 @@ +# This file is generated by cargo2rulesmk.py --run --config cargo2rulesmk.json --features . +# Do not modify this file as changes will be overridden on upgrade. + +LOCAL_DIR := $(GET_LOCAL_DIR) +MODULE := $(LOCAL_DIR) +MODULE_CRATE_NAME := libc +MODULE_SRCS := \ + $(LOCAL_DIR)/src/lib.rs \ + +MODULE_ADD_IMPLICIT_DEPS := false +MODULE_RUST_EDITION := 2015 +MODULE_RUSTFLAGS += \ + --cfg 'freebsd11' \ + --cfg 'libc_align' \ + --cfg 'libc_cfg_target_vendor' \ + --cfg 'libc_const_extern_fn' \ + --cfg 'libc_const_size_of' \ + --cfg 'libc_core_cvoid' \ + --cfg 'libc_int128' \ + --cfg 'libc_long_array' \ + --cfg 'libc_non_exhaustive' \ + --cfg 'libc_packedN' \ + --cfg 'libc_priv_mod_use' \ + --cfg 'libc_ptr_addr_of' \ + --cfg 'libc_underscore_const_names' \ + --cfg 'libc_union' \ + -A unknown-lints \ + +MODULE_LIBRARY_DEPS := \ + external/rust/crates/rustc-std-workspace-core \ + trusty/user/base/lib/libcompiler_builtins-rust \ + trusty/user/base/lib/libcore-rust \ + trusty/user/base/lib/libc-trusty \ + +include make/library.mk |