From fe3d647dfcec9e0a5df94fe3ae01f5c9a91c4050 Mon Sep 17 00:00:00 2001 From: Erik Murphy-Chutorian Date: Tue, 30 May 2017 17:12:23 -0700 Subject: [PATCH] r0: Add apple_env to bazel actions in objc CROSSTOOL --- tools/objc/CROSSTOOL | 418 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 418 insertions(+) diff --git a/tools/objc/CROSSTOOL b/tools/objc/CROSSTOOL index e2da9ae..1b203bc 100644 --- a/tools/objc/CROSSTOOL +++ b/tools/objc/CROSSTOOL @@ -127,8 +127,46 @@ toolchain { flag: "-fembed-bitcode-marker" } } + implies: "apple_env" } + feature { + name: "apple_env" + env_set { + action: "c-compile" + action: "c++-compile" + action: "c++-module-compile" + action: "c++-header-parsing" + action: "c++-header-preprocessing" + action: "assemble" + action: "preprocess-assemble" + action: "objc-compile" + action: "objc++-compile" + action: "objc-archive" + action: "c++-link-executable" + action: "c++-link-dynamic-library" + action: "c++-link-static-library" + action: "c++-link-alwayslink-static-library" + action: "c++-link-pic-static-library" + action: "c++-link-alwayslink-pic-static-library" + action: "objc-executable" + action: "objc++-executable" + env_entry { + key: "XCODE_VERSION_OVERRIDE" + value: "%{xcode_version_override_value}" + } + env_entry { + key: "APPLE_SDK_VERSION_OVERRIDE" + value: "%{apple_sdk_version_override_value}" + } + env_entry { + key: "APPLE_SDK_PLATFORM" + value: "%{apple_sdk_platform_value}" + } + } + } + + # Security hardening. We need to undef it before redefining it as some # distributions now have it enabled by default. compiler_flag: "-U_FORTIFY_SOURCE" @@ -249,8 +287,46 @@ toolchain { flag: "-fembed-bitcode-marker" } } + implies: "apple_env" } + feature { + name: "apple_env" + env_set { + action: "c-compile" + action: "c++-compile" + action: "c++-module-compile" + action: "c++-header-parsing" + action: "c++-header-preprocessing" + action: "assemble" + action: "preprocess-assemble" + action: "objc-compile" + action: "objc++-compile" + action: "objc-archive" + action: "c++-link-executable" + action: "c++-link-dynamic-library" + action: "c++-link-static-library" + action: "c++-link-alwayslink-static-library" + action: "c++-link-pic-static-library" + action: "c++-link-alwayslink-pic-static-library" + action: "objc-executable" + action: "objc++-executable" + env_entry { + key: "XCODE_VERSION_OVERRIDE" + value: "%{xcode_version_override_value}" + } + env_entry { + key: "APPLE_SDK_VERSION_OVERRIDE" + value: "%{apple_sdk_version_override_value}" + } + env_entry { + key: "APPLE_SDK_PLATFORM" + value: "%{apple_sdk_platform_value}" + } + } + } + + # Security hardening. We need to undef it before redefining it as some # distributions now have it enabled by default. compiler_flag: "-U_FORTIFY_SOURCE" @@ -372,8 +448,46 @@ toolchain { flag: "-fembed-bitcode-marker" } } + implies: "apple_env" } + feature { + name: "apple_env" + env_set { + action: "c-compile" + action: "c++-compile" + action: "c++-module-compile" + action: "c++-header-parsing" + action: "c++-header-preprocessing" + action: "assemble" + action: "preprocess-assemble" + action: "objc-compile" + action: "objc++-compile" + action: "objc-archive" + action: "c++-link-executable" + action: "c++-link-dynamic-library" + action: "c++-link-static-library" + action: "c++-link-alwayslink-static-library" + action: "c++-link-pic-static-library" + action: "c++-link-alwayslink-pic-static-library" + action: "objc-executable" + action: "objc++-executable" + env_entry { + key: "XCODE_VERSION_OVERRIDE" + value: "%{xcode_version_override_value}" + } + env_entry { + key: "APPLE_SDK_VERSION_OVERRIDE" + value: "%{apple_sdk_version_override_value}" + } + env_entry { + key: "APPLE_SDK_PLATFORM" + value: "%{apple_sdk_platform_value}" + } + } + } + + # Security hardening. We need to undef it before redefining it as some # distributions now have it enabled by default. compiler_flag: "-U_FORTIFY_SOURCE" @@ -495,8 +609,46 @@ toolchain { flag: "-fembed-bitcode-marker" } } + implies: "apple_env" } + feature { + name: "apple_env" + env_set { + action: "c-compile" + action: "c++-compile" + action: "c++-module-compile" + action: "c++-header-parsing" + action: "c++-header-preprocessing" + action: "assemble" + action: "preprocess-assemble" + action: "objc-compile" + action: "objc++-compile" + action: "objc-archive" + action: "c++-link-executable" + action: "c++-link-dynamic-library" + action: "c++-link-static-library" + action: "c++-link-alwayslink-static-library" + action: "c++-link-pic-static-library" + action: "c++-link-alwayslink-pic-static-library" + action: "objc-executable" + action: "objc++-executable" + env_entry { + key: "XCODE_VERSION_OVERRIDE" + value: "%{xcode_version_override_value}" + } + env_entry { + key: "APPLE_SDK_VERSION_OVERRIDE" + value: "%{apple_sdk_version_override_value}" + } + env_entry { + key: "APPLE_SDK_PLATFORM" + value: "%{apple_sdk_platform_value}" + } + } + } + + # Security hardening. We need to undef it before redefining it as some # distributions now have it enabled by default. compiler_flag: "-U_FORTIFY_SOURCE" @@ -617,8 +769,46 @@ toolchain { flag: "-fembed-bitcode-marker" } } + implies: "apple_env" } + feature { + name: "apple_env" + env_set { + action: "c-compile" + action: "c++-compile" + action: "c++-module-compile" + action: "c++-header-parsing" + action: "c++-header-preprocessing" + action: "assemble" + action: "preprocess-assemble" + action: "objc-compile" + action: "objc++-compile" + action: "objc-archive" + action: "c++-link-executable" + action: "c++-link-dynamic-library" + action: "c++-link-static-library" + action: "c++-link-alwayslink-static-library" + action: "c++-link-pic-static-library" + action: "c++-link-alwayslink-pic-static-library" + action: "objc-executable" + action: "objc++-executable" + env_entry { + key: "XCODE_VERSION_OVERRIDE" + value: "%{xcode_version_override_value}" + } + env_entry { + key: "APPLE_SDK_VERSION_OVERRIDE" + value: "%{apple_sdk_version_override_value}" + } + env_entry { + key: "APPLE_SDK_PLATFORM" + value: "%{apple_sdk_platform_value}" + } + } + } + + # Security hardening. We need to undef it before redefining it as some # distributions now have it enabled by default. compiler_flag: "-U_FORTIFY_SOURCE" @@ -739,8 +929,46 @@ toolchain { flag: "-fembed-bitcode-marker" } } + implies: "apple_env" } + feature { + name: "apple_env" + env_set { + action: "c-compile" + action: "c++-compile" + action: "c++-module-compile" + action: "c++-header-parsing" + action: "c++-header-preprocessing" + action: "assemble" + action: "preprocess-assemble" + action: "objc-compile" + action: "objc++-compile" + action: "objc-archive" + action: "c++-link-executable" + action: "c++-link-dynamic-library" + action: "c++-link-static-library" + action: "c++-link-alwayslink-static-library" + action: "c++-link-pic-static-library" + action: "c++-link-alwayslink-pic-static-library" + action: "objc-executable" + action: "objc++-executable" + env_entry { + key: "XCODE_VERSION_OVERRIDE" + value: "%{xcode_version_override_value}" + } + env_entry { + key: "APPLE_SDK_VERSION_OVERRIDE" + value: "%{apple_sdk_version_override_value}" + } + env_entry { + key: "APPLE_SDK_PLATFORM" + value: "%{apple_sdk_platform_value}" + } + } + } + + # Security hardening. We need to undef it before redefining it as some # distributions now have it enabled by default. compiler_flag: "-U_FORTIFY_SOURCE" @@ -861,8 +1089,46 @@ toolchain { flag: "-fembed-bitcode-marker" } } + implies: "apple_env" } + feature { + name: "apple_env" + env_set { + action: "c-compile" + action: "c++-compile" + action: "c++-module-compile" + action: "c++-header-parsing" + action: "c++-header-preprocessing" + action: "assemble" + action: "preprocess-assemble" + action: "objc-compile" + action: "objc++-compile" + action: "objc-archive" + action: "c++-link-executable" + action: "c++-link-dynamic-library" + action: "c++-link-static-library" + action: "c++-link-alwayslink-static-library" + action: "c++-link-pic-static-library" + action: "c++-link-alwayslink-pic-static-library" + action: "objc-executable" + action: "objc++-executable" + env_entry { + key: "XCODE_VERSION_OVERRIDE" + value: "%{xcode_version_override_value}" + } + env_entry { + key: "APPLE_SDK_VERSION_OVERRIDE" + value: "%{apple_sdk_version_override_value}" + } + env_entry { + key: "APPLE_SDK_PLATFORM" + value: "%{apple_sdk_platform_value}" + } + } + } + + # Security hardening. We need to undef it before redefining it as some # distributions now have it enabled by default. compiler_flag: "-U_FORTIFY_SOURCE" @@ -983,8 +1249,46 @@ toolchain { flag: "-fembed-bitcode-marker" } } + implies: "apple_env" } + feature { + name: "apple_env" + env_set { + action: "c-compile" + action: "c++-compile" + action: "c++-module-compile" + action: "c++-header-parsing" + action: "c++-header-preprocessing" + action: "assemble" + action: "preprocess-assemble" + action: "objc-compile" + action: "objc++-compile" + action: "objc-archive" + action: "c++-link-executable" + action: "c++-link-dynamic-library" + action: "c++-link-static-library" + action: "c++-link-alwayslink-static-library" + action: "c++-link-pic-static-library" + action: "c++-link-alwayslink-pic-static-library" + action: "objc-executable" + action: "objc++-executable" + env_entry { + key: "XCODE_VERSION_OVERRIDE" + value: "%{xcode_version_override_value}" + } + env_entry { + key: "APPLE_SDK_VERSION_OVERRIDE" + value: "%{apple_sdk_version_override_value}" + } + env_entry { + key: "APPLE_SDK_PLATFORM" + value: "%{apple_sdk_platform_value}" + } + } + } + + # Security hardening. We need to undef it before redefining it as some # distributions now have it enabled by default. compiler_flag: "-U_FORTIFY_SOURCE" @@ -1105,8 +1409,46 @@ toolchain { flag: "-fembed-bitcode-marker" } } + implies: "apple_env" } + feature { + name: "apple_env" + env_set { + action: "c-compile" + action: "c++-compile" + action: "c++-module-compile" + action: "c++-header-parsing" + action: "c++-header-preprocessing" + action: "assemble" + action: "preprocess-assemble" + action: "objc-compile" + action: "objc++-compile" + action: "objc-archive" + action: "c++-link-executable" + action: "c++-link-dynamic-library" + action: "c++-link-static-library" + action: "c++-link-alwayslink-static-library" + action: "c++-link-pic-static-library" + action: "c++-link-alwayslink-pic-static-library" + action: "objc-executable" + action: "objc++-executable" + env_entry { + key: "XCODE_VERSION_OVERRIDE" + value: "%{xcode_version_override_value}" + } + env_entry { + key: "APPLE_SDK_VERSION_OVERRIDE" + value: "%{apple_sdk_version_override_value}" + } + env_entry { + key: "APPLE_SDK_PLATFORM" + value: "%{apple_sdk_platform_value}" + } + } + } + + # Security hardening. We need to undef it before redefining it as some # distributions now have it enabled by default. compiler_flag: "-U_FORTIFY_SOURCE" @@ -1227,8 +1569,46 @@ toolchain { flag: "-fembed-bitcode-marker" } } + implies: "apple_env" } + feature { + name: "apple_env" + env_set { + action: "c-compile" + action: "c++-compile" + action: "c++-module-compile" + action: "c++-header-parsing" + action: "c++-header-preprocessing" + action: "assemble" + action: "preprocess-assemble" + action: "objc-compile" + action: "objc++-compile" + action: "objc-archive" + action: "c++-link-executable" + action: "c++-link-dynamic-library" + action: "c++-link-static-library" + action: "c++-link-alwayslink-static-library" + action: "c++-link-pic-static-library" + action: "c++-link-alwayslink-pic-static-library" + action: "objc-executable" + action: "objc++-executable" + env_entry { + key: "XCODE_VERSION_OVERRIDE" + value: "%{xcode_version_override_value}" + } + env_entry { + key: "APPLE_SDK_VERSION_OVERRIDE" + value: "%{apple_sdk_version_override_value}" + } + env_entry { + key: "APPLE_SDK_PLATFORM" + value: "%{apple_sdk_platform_value}" + } + } + } + + # Security hardening. We need to undef it before redefining it as some # distributions now have it enabled by default. compiler_flag: "-U_FORTIFY_SOURCE" @@ -1349,8 +1729,46 @@ toolchain { flag: "-fembed-bitcode-marker" } } + implies: "apple_env" } + feature { + name: "apple_env" + env_set { + action: "c-compile" + action: "c++-compile" + action: "c++-module-compile" + action: "c++-header-parsing" + action: "c++-header-preprocessing" + action: "assemble" + action: "preprocess-assemble" + action: "objc-compile" + action: "objc++-compile" + action: "objc-archive" + action: "c++-link-executable" + action: "c++-link-dynamic-library" + action: "c++-link-static-library" + action: "c++-link-alwayslink-static-library" + action: "c++-link-pic-static-library" + action: "c++-link-alwayslink-pic-static-library" + action: "objc-executable" + action: "objc++-executable" + env_entry { + key: "XCODE_VERSION_OVERRIDE" + value: "%{xcode_version_override_value}" + } + env_entry { + key: "APPLE_SDK_VERSION_OVERRIDE" + value: "%{apple_sdk_version_override_value}" + } + env_entry { + key: "APPLE_SDK_PLATFORM" + value: "%{apple_sdk_platform_value}" + } + } + } + + # Security hardening. We need to undef it before redefining it as some # distributions now have it enabled by default. compiler_flag: "-U_FORTIFY_SOURCE"