diff options
author | lberki <lberki@google.com> | 2018-07-26 07:44:33 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-07-26 07:45:49 -0700 |
commit | 74146fdbcc4eb0463e64588a764b22e253a405ac (patch) | |
tree | f37bc5ac2ae707274f1bd3fbb4a8f90682980c70 /src/test/shell | |
parent | 676e0cd86b51e37cfa710e456b22853914c1cf0a (diff) |
Add a flag to make Apple rules not share C++ compile actions.
This is accomplished by:
- Setting the APPLE_CROSSTOOL configuration distinguisher in AppleCrosstoolTransition
- Doing nothing in AppleCrosstoolTransition in case we are already in an Apple configuration so that funky use cases like a binary having a dependency on a swift_library both directly and through an objc_library work
- Adding the "apl-" prefix to the output directory name in APPLE_CROSSTOOL configurations
Plus a few minor cleanups:
- Removed some unused methods
- Nopped out --enable_apple_crosstool_transition if the new flag is set
- Nopped out --target_uses_apple_crosstool if the new flag is set
These latter reduce the possible space of Apple configurations, thus making the code a bit more comprehensible.
RELNOTES: None.
PiperOrigin-RevId: 206157413
Diffstat (limited to 'src/test/shell')
-rwxr-xr-x | src/test/shell/bazel/apple/bazel_objc_test.sh | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/test/shell/bazel/apple/bazel_objc_test.sh b/src/test/shell/bazel/apple/bazel_objc_test.sh index e60c98b957..09dd0536ff 100755 --- a/src/test/shell/bazel/apple/bazel_objc_test.sh +++ b/src/test/shell/bazel/apple/bazel_objc_test.sh @@ -49,9 +49,10 @@ function test_build_app() { setup_objc_test_support make_lib - bazel build --verbose_failures --ios_sdk_version=$IOS_SDK_VERSION \ + bazel build --verbose_failures --apple_crosstool_in_output_directory_name \ + --ios_sdk_version=$IOS_SDK_VERSION \ //ios:lib >$TEST_log 2>&1 || fail "should pass" - ls bazel-out/ios_x86_64-fastbuild/bin/ios/liblib.a \ + ls bazel-out/apl-ios_x86_64-fastbuild/bin/ios/liblib.a \ || fail "should generate lib.a" } @@ -101,7 +102,7 @@ int aFunction() { } EOF - bazel build --verbose_failures --apple_crosstool_transition \ + bazel build --verbose_failures --apple_crosstool_in_output_directory_name \ --ios_sdk_version=$IOS_SDK_VERSION //objclib:objclib >"$TEST_log" 2>&1 \ || fail "Should build objc_library" @@ -109,9 +110,9 @@ EOF # Dec 31 1969 or Jan 1 1970 -- either is fine. # We would use 'date' here, but the format is slightly different (Jan 1 vs. # Jan 01). - ar -tv bazel-out/ios_x86_64-fastbuild/bin/objclib/libobjclib.a \ + ar -tv bazel-out/apl-ios_x86_64-fastbuild/bin/objclib/libobjclib.a \ | grep "mysrc" | grep "Dec 31" | grep "1969" \ - || ar -tv bazel-out/ios_x86_64-fastbuild/bin/objclib/libobjclib.a \ + || ar -tv bazel-out/apl-ios_x86_64-fastbuild/bin/objclib/libobjclib.a \ | grep "mysrc" | grep "Jan 1" | grep "1970" || \ fail "Timestamp of contents of archive file should be zero" } |