moz.build (1077B)
1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- 2 # vim: set filetype=python: 3 # This Source Code Form is subject to the terms of the Mozilla Public 4 # License, v. 2.0. If a copy of the MPL was not distributed with this 5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 6 7 features = [] 8 9 if CONFIG["MOZ_RUST_SIMD"]: 10 features += ["simd-accel"] 11 12 if CONFIG["FUZZING_INTERFACES"]: 13 features += ["gluesmith"] 14 15 if CONFIG["MOZ_MEMORY"]: 16 features += ["moz_memory"] 17 18 if CONFIG["MOZ_ICU4X"]: 19 features += ["icu4x"] 20 21 RustLibrary("jsrust", features) 22 23 if CONFIG["JS_SHARED_LIBRARY"]: 24 FINAL_LIBRARY = "js" 25 26 if CONFIG["OS_ARCH"] == "Darwin": 27 # The Rust standard library references libresolv on macOS, so we need to 28 # link it as a workaround. See also bug 1367932. 29 OS_LIBS += ["-lresolv"] 30 elif CONFIG["OS_ARCH"] == "WINNT": 31 # Extra libraries used by Rust bindings libs in debug builds. 32 OS_LIBS += [ 33 "shell32", 34 "userenv", 35 "ws2_32", 36 ] 37 38 COMPILE_FLAGS["BASE_INCLUDES"] = [] 39 HOST_COMPILE_FLAGS["BASE_INCLUDES"] = []