1# Copyright (C) 2022 The Android Open Source Project 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14# 15 16LOCAL_DIR := $(GET_LOCAL_DIR) 17 18MODULE := $(LOCAL_DIR) 19 20# temporarily handle both old and new crate paths (b/266828817) 21ifneq ($(wildcard external/rust/crates/openssl/.*),) 22SRC_DIR := external/rust/crates/openssl 23else 24SRC_DIR := external/rust/crates/rust-openssl/openssl 25endif 26 27MODULE_SRCS := $(SRC_DIR)/src/lib.rs 28 29MODULE_CRATE_NAME := openssl 30 31MODULE_RUST_EDITION := 2018 32 33MODULE_LIBRARY_DEPS += \ 34 $(call FIND_CRATE,bitflags) \ 35 $(call FIND_CRATE,cfg-if) \ 36 $(call FIND_CRATE,foreign-types) \ 37 $(call FIND_CRATE,libc) \ 38 $(call FIND_CRATE,once_cell) \ 39 $(call FIND_CRATE,openssl-macros) \ 40 $(call FIND_CRATE,log) \ 41 trusty/user/base/lib/bssl-sys-rust \ 42 43MODULE_RUSTFLAGS += \ 44 --cfg 'boringssl' \ 45 --cfg 'soong' \ 46 --cfg 'feature="unstable_boringssl"' \ 47 -A unused-imports \ 48 -A deprecated \ 49 -A dead-code \ 50 51include make/library.mk 52