aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/objc/LegacyCompilationSupport.java
Commit message (Collapse)AuthorAge
* Move RuleConfiguredTarget to lib.analysis.configuredtargets.Gravatar gregce2017-09-19
| | | | | | This is a trivial change with a large file footprint. PiperOrigin-RevId: 169169864
* Automatic code cleanup.Gravatar cushon2017-09-15
| | | | PiperOrigin-RevId: 168802886
* Support multiple command lines / params files in SpawnAction.Gravatar tomlu2017-09-15
| | | | | | This is necessary for the upcoming Skylark implementation of param files. PiperOrigin-RevId: 168744486
* Inline CustomCommandLine methods that can be expressed using VectorArg.Gravatar tomlu2017-09-12
| | | | | | This whole CL was done using IDE refactoring tools and should be safe. PiperOrigin-RevId: 168275575
* Automated rollback of commit fc41c430e4de4594a1d699f573d191cbad52a2fb.Gravatar plf2017-09-01
| | | | PiperOrigin-RevId: 167154793
* Move ObjcProvider FLAG into a new provider type (TransitiveSourcesProvider) ↵Gravatar cpeyser2017-08-30
| | | | | | that is accessible to the c++ rules. PiperOrigin-RevId: 166934390
* Change bug tracking in TODOs for LegacyCompilationSupport deprecation.Gravatar cparsons2017-08-30
| | | | | RELNOTES: None. PiperOrigin-RevId: 166889164
* Remove TODO from LegacyCompilationSupport.Gravatar tomlu2017-08-29
| | | | PiperOrigin-RevId: 166722992
* Automated rollback of commit 1af9b1e2238c3b43a2b66233495ecf7b6ef4dcab.Gravatar Googler2017-08-25
| | | | | | | | | | | | *** Reason for rollback *** Reason for previous rollback was identified as being a memory regression causing some cases to hit java heap limit. Proposal is to increase java heap limit to compensate and just go with the original change. *** Original change description *** Automated rollback of commit 6cfffdf37e11018c7e6e2cabc90440d6d29c819b. PiperOrigin-RevId: 166426608
* Allow CommandLine expansion to throw an exception.Gravatar tomlu2017-08-24
| | | | | | | | | | | | | | | | | | | This paves the way for Skylark-side compact command lines that can fail during expansion. In general, expansion happens in these scenarios: * Action execution expands the command line to execute it. This is fine since we are well equipped already to handle failing actions. * In the analysis phase we expand command lines to investigate whether we need a params file. This could be moved to the execution phase, which would have the benefit of getting params files out of the action graph and saving memory. * Key computation expands the command line. This could be fixed by allowing command lines to compute their own keys (which wouldn't try to expand the command line). This could have the benefit of being more efficient. * Extra actions expand the command line to construct the extra action proto. This could maybe be deferred to the execution phase (writing the extra action), which would also be more memory efficient. For failed key computations, we return a singleton "error" key. This means multiple actions that will fail will map to the same key. These actions will necessarily fail if executed, so we should not need to worry about these ending up in the action cache. If we do manage to make the command line compute its own keys then this will become moot in the future. RELNOTES: None PiperOrigin-RevId: 166266385
* Improve CustomCommandLine interface.Gravatar tomlu2017-08-22
| | | | | | | | | | | | | | | | In converting SpawnAction.Builder (multi-thousand line CL) users directly to CustomCommandLine I didn't like the resulting loss of readability, and the methods didn't feel very discoverable. Unless it's very convenient and readable to use CustomCommandLine, people will resort to non-memory efficient patterns by default. I'm holding that CL for this, which should offer a nicer interface. This CL removes VectorArg from the API contact surface area, instead creating 64 overloads for every valid combination of parameters. Pretty sad, but the methods dispatch straight to internal helper methods so it's mostly boilerplate to the tune of +400 LOC. Other changes: * Change ImmutableCollection -> Collection and copy the args directly into the internal args vector. Saves on collection object overhead and saves users from having to create immutable copies. * Change some names, notably add -> addAll for collection methods * Create additional missing overloads * Fix JavaDoc RELNOTES: None PiperOrigin-RevId: 165943879
* Add more type safety to CustomCommandLine.Gravatar tomlu2017-08-16
| | | | | | | | | | | | Allowing add(Object) is too loose and can easily lead to programmer mistakes. Because of type erasure, we can't use the same overload name for (eg.) add(NestedSet<String>) and add(NestedSet<Artifact>). The API is overhauled to use the same terms everywhere, eg. "add", "addPaths", "addExecPaths". This is similar to how it used to be a few CLs ago. The API is overhauled to make sure it's consistent for all types. While tedious, the facade methods immediately dispatch to internal helpers, so implementation wise it's not too heavy. While large, this CL is almost entirely an automated refactor. PiperOrigin-RevId: 165358287
* Add @CompileTimeConstant annotations to CustomCommandLine.Gravatar tomlu2017-08-16
| | | | | | | | | This enforces certain memory-efficient patterns. For deliberate use of dynamic strings, explicitly named overloads are introduced, with javadoc that guides the programmer into making the right choice. This CL is a memory no-op on benchmarks, but it tries to prevent backslide by making sure programmers make conscious choices when they construct their command lines. RELNOTES: None PiperOrigin-RevId: 165185997
* Inline @Deprecated methods in CustomCommandLine.Gravatar tomlu2017-08-11
| | | | | | | | | Apart from updating CustomCommandLineTest this CL is entirely automated. We also sneak in a rename of addFormat -> addFormatted. RELNOTES: None PiperOrigin-RevId: 164870140
* Improve CustomCommandLine.Gravatar tomlu2017-08-10
| | | | | | | | | | | | | Instead of having custom ArgvFragments for every combination of desired things, we make a combined "interpreter" of argvs. This saves memory and simplifies things as we do not have to allocate a strategy instance per call to args (instead pushing a single shared instance, followed by the args). The generic interpreter does have a lot of branching compared to the bespoke implementations, but because the branch is always the same for long stretches the branch predictor should easily be able to handle it with minimal overhead (~1 cycle per branch IIRC). This CL also elevates that we either want a NestedSet or an ImmutableCollection to the surface of the API, so consumers understand the cost when they call it with a non-immutable collection. Most of the changes in clients is due to this. To cut down on CL churn, @Deprecated forwarding methods are added to CustomCommandLine. These will be removed in a separate CL using IDE inlining. RELNOTES: None PiperOrigin-RevId: 164725370
* Automated rollback of commit 6cfffdf37e11018c7e6e2cabc90440d6d29c819b.Gravatar cpeyser2017-08-02
| | | | PiperOrigin-RevId: 163889699
* macOS link actions set the correct system framework include pathsGravatar cparsons2017-07-26
| | | | | RELNOTES: None. PiperOrigin-RevId: 163114020
* Route Xcode version information through an implicit dependency instead of ↵Gravatar lberki2017-07-25
| | | | | | | | | | | | | | the configuration. This is part of the crusade to kill package loading in configuration creation. AppleConfiguration still retains the version information for the following reasons: - Some Skylark rules access it that way. The plan is to create an xcode_config_alias() rule that can be an implicit dependency of Skylark rules and to export the version information to Skylark from XcodeVersionsProvider. - The minimum OS version is part of the name of the output directory. The plan for that is simply to remove it. Hopefully we can get away with it. - They allow us to add assertions to make sure the new mechanism works like the old one. RELNOTES: None. PiperOrigin-RevId: 163038724
* Add module_map attribute to objc_libraryGravatar Googler2017-07-14
| | | | | | This allows users to specify a custom module map. PiperOrigin-RevId: 161827651
* Remove objc_includes_prioritize_static_libsGravatar cparsons2017-07-10
| | | | | | | This flag was experimental but is now always-on. RELNOTES: None. PiperOrigin-RevId: 161234569
* Platform -> ApplePlatform, to avoid ambiguity with the newly introducedGravatar cpeyser2017-07-07
| | | | | | Platform rule. PiperOrigin-RevId: 161203491
* Automated rollback of commit 9000e61fc1737444392ffe251727e8331fab3cf2.Gravatar Googler2017-07-07
| | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Fixed handling of pch, so this should work again *** Original change description *** Automated rollback of commit 29ec1b89989db411d2038e2df8657b6435f80403. *** Reason for rollback *** Breaks the classroom_ios TAP project [1] in the presence of --experimental_objc_crosstool=all, which was added to the global .blazerc last week. [1] [] *** Original change description *** Change ProtobufSupport to use CrosstoolCompilationSupport if experimental_objc_crosstool=all PiperOrigin-RevId: 161159846
* Switch from using set/getPchFile on CompilationArtifacts to a doNotUsePch ↵Gravatar Googler2017-07-07
| | | | | | option on CompilationSupport. In the process correctly respect whether to use the pch file under crosstool compilation mode. PiperOrigin-RevId: 161156717
* Remove --xcode_override_workspace_root and ↵Gravatar cparsons2017-06-30
| | | | | | | | | --experimental_use_absolute_paths_for_actions. These flags are old and unused -- with the deletion of xcodegen, addition of Tulsi, and near-migration to crosstool objc compilation, these flags are long-deprecated and are now cleaned up. RELNOTES: None. PiperOrigin-RevId: 160578161
* Automated g4 rollback of commit 29ec1b89989db411d2038e2df8657b6435f80403.Gravatar fwe2017-06-13
| | | | | | | | | | | | | | *** Reason for rollback *** Breaks the classroom_ios TAP project [1] in the presence of --experimental_objc_crosstool=all, which was added to the global .blazerc last week. [1] [] *** Original change description *** Change ProtobufSupport to use CrosstoolCompilationSupport if experimental_objc_crosstool=all PiperOrigin-RevId: 158727100
* Specify isTestRule as an input to CompilationSupport instead of from the ↵Gravatar cparsons2017-06-06
| | | | | | | current rule name RELNOTES: None. PiperOrigin-RevId: 158068921
* Change ProtobufSupport to use CrosstoolCompilationSupport if ↵Gravatar Googler2017-05-30
| | | | | | experimental_objc_crosstool=all PiperOrigin-RevId: 157421008
* Export the FILES_TO_COMPILE output group from the objc rules. Add a builder ↵Gravatar cpeyser2017-04-25
| | | | | | to CompilationSupport to clean up that expanding API. PiperOrigin-RevId: 154077775
* Replace constants (static final CONSTANT_CASE) declaration type which use ↵Gravatar Googler2017-04-05
| | | | | | | | the general collection interface (e.g. List) with an immutable type (e.g. ImmutableList). For constant field declarations, you should use the immutable type (such as ImmutableList) instead of the general collection interface type (such as List). This communicates to your callers important semantic guarantees. PiperOrigin-RevId: 152223147
* objc_proto_library does not pick up generated cc code in compile actions.Gravatar cpeyser2017-04-05
| | | | PiperOrigin-RevId: 152169986
* Implement DSYM generation for the CROSSTOOL rules.Gravatar cpeyser2017-04-04
| | | | PiperOrigin-RevId: 152011915
* Apple binary configures actions not just with it's child's config and provider,Gravatar Cal Peyser2017-03-28
| | | | | | | | but also its toolchain. -- PiperOrigin-RevId: 151444602 MOS_MIGRATED_REVID=151444602
* Finish implementing binary stripping for --experimental_objc_crosstool=all.Gravatar Cal Peyser2017-03-24
| | | | | | | | | | | | This involves: (1) Adding the -g compiler flag (2) If the target is a test, do not add linker flags. (3) Move relevant tests to crosstool case. -- PiperOrigin-RevId: 151055080 MOS_MIGRATED_REVID=151055080
* Sink automatic SDK frameworks into legacy compilation support.Gravatar Googler2017-03-17
| | | | | | -- PiperOrigin-RevId: 150353881 MOS_MIGRATED_REVID=150353881
* Adds support for the header thinning feature to the new Objective-C rule ↵Gravatar Googler2017-03-03
| | | | | | | | implementation that uses crosstool for compilation. -- PiperOrigin-RevId: 149083774 MOS_MIGRATED_REVID=149083774
* CrosstoolCompilationSupport registers a binary strip action when binaryGravatar Cal Peyser2017-02-27
| | | | | | | | stripping is enabled. -- PiperOrigin-RevId: 148458258 MOS_MIGRATED_REVID=148458258
* Update to header thinning feature to create header_scanner actions based on ↵Gravatar Googler2017-02-23
| | | | | | | | compiler flags. -- PiperOrigin-RevId: 148273368 MOS_MIGRATED_REVID=148273368
* Crosstool compilation support for J2ObjcAspect.Gravatar Rumou Duan2017-02-22
| | | | | | | | Note that I also have to make some changes to cpp files to add the ability to specify a suffix for linked artifacts. This helps to avoid an artifact conflict between proto_library and J2ObjcAspect acting on proto_library, where both will create an archive file. J2ObjcAspect will simply generate a "_j2objc.a" archive instead of ".a" archive. -- PiperOrigin-RevId: 148135630 MOS_MIGRATED_REVID=148135630
* Rollback of commit aa1d31da27793d4c29bfa4dec12d1ae9ab20426b.Gravatar Googler2017-02-13
| | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** It is not certain that this won't break users, and the value-add to them is not significant. The intent is to make these changes in the crosstool. *** Original change description *** Blaze/bazel modifications to command line flags used when dead-stripping. - Passing -g to the compiler is no longer required. - Instead of detecting test rules, detect "-bundle" in the command line. - In that case, pass "-x", not "-S", to strip. - Do not inhibit dead-code stripping for tests. RELNOTES: Modifications to command line flags used for dead-stripping. -- PiperOrigin-RevId: 147185327 MOS_MIGRATED_REVID=147185327
* Blaze/bazel modifications to command line flags used when dead-stripping.Gravatar Googler2017-02-13
| | | | | | | | | | | | | | - Passing -g to the compiler is no longer required. - Instead of detecting test rules, detect "-bundle" in the command line. - In that case, pass "-x", not "-S", to strip. - Do not inhibit dead-code stripping for tests. RELNOTES: Modifications to command line flags used for dead-stripping. -- PiperOrigin-RevId: 147171780 MOS_MIGRATED_REVID=147171780
* Generated files directory is passed to dependers as a user header search ↵Gravatar Cal Peyser2017-02-09
| | | | | | | | path. In the process, rename and replace the incorrectly named ObjcCommon.Builder#addUserHeaderSearchPaths -- PiperOrigin-RevId: 147038434 MOS_MIGRATED_REVID=147038434
* Experimental feature to do header thinning of Objective-C compilation actions.Gravatar Googler2017-02-03
| | | | | | -- PiperOrigin-RevId: 146385106 MOS_MIGRATED_REVID=146385106
* Add Bitcode symbol maps and AppleDebugOutputsProviderGravatar Dmitry Shevchenko2017-01-26
| | | | | | | | | | * Bitcode symbol maps allow Apple to provide a new dSYM output when they recompile bitcode on the App Store. This makes it possible to debug apps build with embedded bitcode. * The new debug outputs provider makes it easy (and correct) for other rules to post-process (package, analyze, upload) dSYM and Bitcode artifacts. -- PiperOrigin-RevId: 145720293 MOS_MIGRATED_REVID=145720293
* Introduce --experimental_objc_crosstool, which replacesGravatar Cal Peyser2017-01-19
| | | | | | | | | | --experimental_objc_library and --experimental_objc_use_crosstool_for_binary. This flag will allow testing of the complete (compilation and linking) rollout of the objc crosstool. -- PiperOrigin-RevId: 144864301 MOS_MIGRATED_REVID=144864301
* Use the value of --watchos_minimum_os for clang's -mwatchos-version-min when ↵Gravatar Googler2017-01-03
| | | | | | | | | | | compiling/linking instead of --watchos_sdk_version. RELNOTES: Set clang's -mwatchos-version-min correctly using the value of --watchos_minimum_os, not --watchos_sdk_version. -- PiperOrigin-RevId: 143444638 MOS_MIGRATED_REVID=143444638
* "deps" attribute avoids linking libraries transitively included in "dylibs" ↵Gravatar Chris Parsons2016-12-09
| | | | | | | | | | attribute This prevents duplicate symbol errors for objects that would otherwise be linked both in the application binary and a dylib the binary is linked against. -- PiperOrigin-RevId: 141478238 MOS_MIGRATED_REVID=141478238
* Remove Swift support from native rulesGravatar Dmitry Shevchenko2016-11-24
| | | | | -- MOS_MIGRATED_REVID=140068224
* Add bitcode linker flagsGravatar Dmitry Shevchenko2016-11-18
| | | | | | | | | | * Adds a link time option to embed bitcode, in addition to the existing compile time option. * This does not handle Bitcode symbols, just hides them. RELNOTES: -- MOS_MIGRATED_REVID=139520095
* ObjcCompileAction does not signal to skyframe that it discovers inputs.Gravatar Cal Peyser2016-11-17
| | | | | | | | | | | Instead, it skips discovery (include scanning), but provides all headers to action execution to allow for re-adding pruned sources in a sandbox. This means that mis-capitalization errors will only break a build if --objc_use_dotd_pruning is one. -- MOS_MIGRATED_REVID=139456194
* Implement basic objc executable linking in the CROSSTOOL.Gravatar Cal Peyser2016-11-16
| | | | | | | | | | | | | | The following link features are *not* implemented yet: 1) Objc++ linking semantics 2) Dead stripping 3) --should_prioritize_static_libs 4) DSYM generation 5) Coverage support 6) Swift interop 7) Linkmap -- MOS_MIGRATED_REVID=139232434