diff options
author | Chris Parsons <cparsons@google.com> | 2017-01-20 21:53:32 +0000 |
---|---|---|
committer | Laszlo Csomor <laszlocsomor@google.com> | 2017-01-23 09:52:47 +0000 |
commit | ec857c7d910fd36a0ad4a9a0234e05afc245d620 (patch) | |
tree | 095be72abc354d323fa7db4b5f041d0251b9f304 /src/main/java | |
parent | 1a08bd951cd5d43a9c6eb0e1294c0c56257929bd (diff) |
Rename "bundle" apple_binary to "loadable_bundle".
Also some apple binary test cleanup along the way.
--
PiperOrigin-RevId: 145123804
MOS_MIGRATED_REVID=145123804
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/objc/AppleBinary.java | 6 | ||||
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/objc/AppleBinaryRule.java | 23 |
2 files changed, 15 insertions, 14 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/AppleBinary.java b/src/main/java/com/google/devtools/build/lib/rules/objc/AppleBinary.java index 4d789bbac6..0f46226770 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/AppleBinary.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/AppleBinary.java @@ -61,7 +61,7 @@ public class AppleBinary implements RuleConfiguredTargetFactory { * test binary along with required resources. The test bundle is then loaded and run during * test execution. */ - BUNDLE, + LOADABLE_BUNDLE, /** * Binaries that can be run directly by the operating system. They implement the main method @@ -186,12 +186,12 @@ public class AppleBinary implements RuleConfiguredTargetFactory { .attributes() .isAttributeValueExplicitlySpecified(AppleBinaryRule.BUNDLE_LOADER_ATTR); - if (didProvideBundleLoader && binaryType != BinaryType.BUNDLE) { + if (didProvideBundleLoader && binaryType != BinaryType.LOADABLE_BUNDLE) { ruleContext.throwWithRuleError(BUNDLE_LOADER_NOT_IN_BUNDLE_ERROR); } switch(binaryType) { - case BUNDLE: + case LOADABLE_BUNDLE: extraLinkArgs.add("-bundle"); if (didProvideBundleLoader) { Artifact bundleLoader = diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/AppleBinaryRule.java b/src/main/java/com/google/devtools/build/lib/rules/objc/AppleBinaryRule.java index 17c1ff6d82..f814bef168 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/AppleBinaryRule.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/AppleBinaryRule.java @@ -47,7 +47,8 @@ public class AppleBinaryRule implements RuleDefinition { private static final SafeImplicitOutputsFunction LIPOBIN = fromTemplates("%{name}_lipobin"); /** - * There are 3 classes of fully linked binaries in Mach: executable, dynamic library and bundle. + * There are 3 classes of fully linked binaries in Mach: executable, dynamic library, and + * loadable bundle. * * <p>The executable is the binary that can be run directly by the operating system. It implements * implements the main method that is the entry point to the program. In Apple apps, they are @@ -61,13 +62,13 @@ public class AppleBinaryRule implements RuleDefinition { * distributed in frameworks, which are .framework bundles that contain the dylib as well as well * as required resources to run. * - * <p>Bundles are binaries that can be loaded by other binaries at runtime, and they can't be - * directly executed by the operating system. When linking, a bundle_loader binary may be passed - * which signals the linker on where to look for unimplemented symbols, basically declaring that - * the bundle should be loaded by that binary. Bundle binaries are usually found in Plugins, and - * one common use case is tests. Tests are bundled into an .xctest bundle which contains the tests - * binary along with required resources. The test bundle is then loaded and run during test - * execution. + * <p>Loadable bundles are binaries that can be loaded by other binaries at runtime, and they + * can't be directly executed by the operating system. When linking, a bundle_loader binary may + * be passed which signals the linker on where to look for unimplemented symbols, basically + * declaring that the bundle should be loaded by that binary. Bundle binaries are usually found + * in Plugins, and one common use case is tests. Tests are bundled into an .xctest bundle which + * contains the tests binary along with required resources. The test bundle is then loaded and + * run during test execution. * * <p>The binary type is configurable via the "binary_type" attribute described below. */ @@ -91,9 +92,9 @@ public class AppleBinaryRule implements RuleDefinition { <code>executable</code> (default): the output binary is an executable and must implement the main() function. </li><li> - <code>bundle</code>: the output binary is a loadable bundle that may be loaded at - runtime. When building a bundle, you may also pass a bundle_loader binary that contains - symbols referenced but not implemented in the bundle. + <code>loadable_bundle</code>: the output binary is a loadable bundle that may be loaded + at runtime. When building a bundle, you may also pass a bundle_loader binary that + contains symbols referenced but not implemented in the loadable bundle. </li><li> <code>dylib</code>: the output binary is meant to be loaded at load time (when the operating system is loading the binary into memory) and cannot be unloaded. Dylibs |