Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into feature/hermetic_…
Browse files Browse the repository at this point in the history
…sandbox
  • Loading branch information
frazze-jobb committed Apr 30, 2021
2 parents ae3242c + 064c731 commit b087bac
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 93 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ public class ObjcConfiguration extends Fragment implements ObjcConfigurationApi<
private final String watchosSimulatorDevice;
private final DottedVersion tvosSimulatorVersion;
private final String tvosSimulatorDevice;
private final boolean generateDsym;
private final boolean generateLinkmap;
private final boolean runMemleaks;
private final ImmutableList<String> copts;
Expand All @@ -69,7 +68,6 @@ public class ObjcConfiguration extends Fragment implements ObjcConfigurationApi<

public ObjcConfiguration(BuildOptions buildOptions) {
CoreOptions options = buildOptions.get(CoreOptions.class);
CppOptions cppOptions = buildOptions.get(CppOptions.class);
ObjcCommandLineOptions objcOptions = buildOptions.get(ObjcCommandLineOptions.class);

this.iosSimulatorDevice = objcOptions.iosSimulatorDevice;
Expand All @@ -82,9 +80,6 @@ public ObjcConfiguration(BuildOptions buildOptions) {
this.runMemleaks = objcOptions.runMemleaks;
this.copts = ImmutableList.copyOf(objcOptions.copts);
this.compilationMode = Preconditions.checkNotNull(options.compilationMode, "compilationMode");
this.generateDsym =
cppOptions.appleGenerateDsym
|| (cppOptions.appleEnableAutoDsymDbg && this.compilationMode == CompilationMode.DBG);
this.fastbuildOptions = ImmutableList.copyOf(objcOptions.fastbuildOptions);
this.enableBinaryStripping = objcOptions.enableBinaryStripping;
this.signingCertName = objcOptions.iosSigningCertName;
Expand Down Expand Up @@ -141,14 +136,6 @@ public DottedVersion getSimulatorVersionForPlatformType(PlatformType platformTyp
}
}

/**
* Returns whether dSYM generation is enabled.
*/
@Override
public boolean generateDsym() {
return generateDsym;
}

/**
* Returns whether linkmap generation is enabled.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,6 @@ public interface ObjcConfigurationApi<ApplePlatformTypeApiT extends ApplePlatfor
@Nullable
DottedVersionApi<?> getSimulatorVersionForPlatformType(ApplePlatformTypeApiT platformType);

@StarlarkMethod(
name = "generate_dsym",
doc = "Whether to generate debug symbol(.dSYM) artifacts.",
structField = true)
boolean generateDsym();

@StarlarkMethod(
name = "generate_linkmap",
doc = "Whether to generate linkmap artifacts.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5232,25 +5232,6 @@ def _impl(ctx):

has_configured_linker_path_feature = feature(name = "has_configured_linker_path")

use_objc_modules_feature = feature(
name = "use_objc_modules",
flag_sets = [
flag_set(
actions = [ACTION_NAMES.objc_compile, ACTION_NAMES.objcpp_compile],
flag_groups = [
flag_group(
flags = [
"-fmodule-name=%{module_name}",
"-iquote",
"%{module_maps_dir}",
"-fmodules-cache-path=%{modules_cache_path}",
],
),
],
),
],
)

language_objc_feature = feature(
name = "lang_objc",
provides = [
Expand Down Expand Up @@ -6855,17 +6836,6 @@ def _impl(ctx):
],
)

no_enable_modules_feature = feature(
name = "no_enable_modules",
flag_sets = [
flag_set(
actions = [ACTION_NAMES.objc_compile, ACTION_NAMES.objcpp_compile],
flag_groups = [flag_group(flags = ["-fmodule-maps"])],
),
],
requires = [feature_set(features = ["use_objc_modules"])],
)

autofdo_feature = feature(
name = "autofdo",
flag_sets = [
Expand Down Expand Up @@ -7907,8 +7877,6 @@ def _impl(ctx):
force_pic_flags_feature,
pch_feature,
module_maps_feature,
use_objc_modules_feature,
no_enable_modules_feature,
apply_default_warnings_feature,
preprocessor_defines_feature,
xcode_5_0_feature,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -687,14 +687,12 @@ public void testStarlarkCanAccessObjcConfiguration() throws Exception {
" ios_simulator_device = ctx.fragments.objc.ios_simulator_device",
" ios_simulator_version = ctx.fragments.objc.ios_simulator_version",
" signing_certificate_name = ctx.fragments.objc.signing_certificate_name",
" generate_dsym = ctx.fragments.objc.generate_dsym",
" return MyInfo(",
" copts=copts,",
" compilation_mode_copts=compilation_mode_copts,",
" ios_simulator_device=ios_simulator_device,",
" ios_simulator_version=str(ios_simulator_version),",
" signing_certificate_name=signing_certificate_name,",
" generate_dsym=generate_dsym,",
" )",
"swift_binary = rule(",
"implementation = swift_binary_impl,",
Expand All @@ -715,8 +713,7 @@ public void testStarlarkCanAccessObjcConfiguration() throws Exception {
"--objccopt=-DTestObjcCopt",
"--ios_simulator_device='iPhone 6'",
"--ios_simulator_version=8.4",
"--ios_signing_cert_name='Apple Developer'",
"--apple_generate_dsym");
"--ios_signing_cert_name='Apple Developer'");
ConfiguredTarget starlarkTarget = getConfiguredTarget("//examples/objc_starlark:my_target");
StructImpl myInfo = getMyInfoFromTarget(starlarkTarget);

Expand All @@ -727,14 +724,12 @@ public void testStarlarkCanAccessObjcConfiguration() throws Exception {
Object iosSimulatorDevice = myInfo.getValue("ios_simulator_device");
Object iosSimulatorVersion = myInfo.getValue("ios_simulator_version");
Object signingCertificateName = myInfo.getValue("signing_certificate_name");
Boolean generateDsym = (Boolean) myInfo.getValue("generate_dsym");

assertThat(copts).contains("-DTestObjcCopt");
assertThat(compilationModeCopts).containsExactlyElementsIn(ObjcConfiguration.OPT_COPTS);
assertThat(iosSimulatorDevice).isEqualTo("'iPhone 6'");
assertThat(iosSimulatorVersion).isEqualTo("8.4");
assertThat(signingCertificateName).isEqualTo("'Apple Developer'");
assertThat(generateDsym).isTrue();
}

@Test
Expand Down
36 changes: 0 additions & 36 deletions tools/osx/crosstool/cc_toolchain_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -3341,25 +3341,6 @@ def _impl(ctx):
],
)

use_objc_modules_feature = feature(
name = "use_objc_modules",
flag_sets = [
flag_set(
actions = [ACTION_NAMES.objc_compile, ACTION_NAMES.objcpp_compile],
flag_groups = [
flag_group(
flags = [
"-fmodule-name=%{module_name}",
"-iquote",
"%{module_maps_dir}",
"-fmodules-cache-path=%{modules_cache_path}",
],
),
],
),
],
)

objc_arc_feature = feature(
name = "objc_arc",
flag_sets = [
Expand Down Expand Up @@ -3985,17 +3966,6 @@ def _impl(ctx):
],
)

no_enable_modules_feature = feature(
name = "no_enable_modules",
flag_sets = [
flag_set(
actions = [ACTION_NAMES.objc_compile, ACTION_NAMES.objcpp_compile],
flag_groups = [flag_group(flags = ["-fmodule-maps"])],
),
],
requires = [feature_set(features = ["use_objc_modules"])],
)

pic_feature = feature(
name = "pic",
enabled = True,
Expand Down Expand Up @@ -6347,8 +6317,6 @@ def _impl(ctx):
force_pic_flags_feature,
pch_feature,
module_maps_feature,
use_objc_modules_feature,
no_enable_modules_feature,
apply_default_warnings_feature,
includes_feature,
include_paths_feature,
Expand Down Expand Up @@ -6429,8 +6397,6 @@ def _impl(ctx):
force_pic_flags_feature,
pch_feature,
module_maps_feature,
use_objc_modules_feature,
no_enable_modules_feature,
apply_default_warnings_feature,
includes_feature,
include_paths_feature,
Expand Down Expand Up @@ -6510,8 +6476,6 @@ def _impl(ctx):
force_pic_flags_feature,
pch_feature,
module_maps_feature,
use_objc_modules_feature,
no_enable_modules_feature,
apply_default_warnings_feature,
includes_feature,
include_paths_feature,
Expand Down

0 comments on commit b087bac

Please sign in to comment.