// Copyright (C) 2020 Apple Inc. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // 1. Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // 2. Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // // THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CLANG_LINK_OBJC_RUNTIME = NO; EXECUTABLE_PREFIX = libswift; GENERATE_TEXT_BASED_STUBS = YES; IS_ZIPPERED = NO; OTHER_LDFLAGS = $(inherited) -weak_framework WebKit; PRODUCT_NAME = WebKit; STRIP_SWIFT_SYMBOLS = NO; SUPPORTED_PLATFORMS = macosx iphoneos iphonesimulator; SUPPORTS_TEXT_BASED_API = YES; SWIFT_IS_OVERLAY = YES; SWIFT_LINK_OBJC_RUNTIME = NO; SWIFT_OVERLAY_INSTALL_PATH=/usr/lib/swift; DYLIB_CURRENT_VERSION = $(FULL_VERSION); MODULE_VERSION = $(FULL_VERSION); // Disable code signing COPY_PHASE_STRIP = NO; CODE_SIGN_IDENTITY = -; CODE_SIGN_STYLE = Manual; // We need to run install-swiftmodules.sh during the installapi action. INSTALLHDRS_SCRIPT_PHASE = YES; // The install path is /usr/lib/swift except if we're building using the iosmac // SDK variant on macOS, in which case it's /System/iOSSupport/usr/lib/swift. INSTALL_PATH = $(WK_ALTERNATE_FRAMEWORKS_DIR)$(SWIFT_OVERLAY_INSTALL_PATH); OTHER_SWIFT_FLAGS = -module-link-name $(SWIFT_MODULE_LINK_NAME) -autolink-force-load -runtime-compatibility-version none -disable-autolinking-runtime-compatibility-dynamic-replacements; SWIFT_MODULE_LINK_NAME = swift$(PRODUCT_NAME); SWIFT_ENABLE_INCREMENTAL_COMPILATION = NO; // YES conflicts with -autolink-force-load // Custom build settings for install-swiftmodules.sh. SWIFT_INSTALL_MODULES = YES; SWIFT_MODULE_INSTALL_PATH = $(INSTALL_PATH); // We need to generate swiftmodules for these architectures, so that they can be // imported in apps that are deployable on OS versions that support them. // However, we can only generate module files for these; we can't emit binaries. // (All imported definitions will be unavailable on these older OS versions.) SWIFT_MODULE_ONLY_ARCHS = $(SWIFT_MODULE_ONLY_ARCHS_$(PLATFORM_NAME)); SWIFT_MODULE_ONLY_ARCHS_iphoneos = armv7 armv7s; SWIFT_MODULE_ONLY_ARCHS_iphonesimulator = i386; SWIFT_MODULE_ONLY_IPHONEOS_DEPLOYMENT_TARGET = 10.3;