diff options
author | Cal Peyser <cpeyser@google.com> | 2016-02-16 17:31:06 +0000 |
---|---|---|
committer | Damien Martin-Guillerez <dmarting@google.com> | 2016-02-17 09:55:17 +0000 |
commit | e5031ecfb0a2f09915206cef5daf55053c27b72f (patch) | |
tree | 4ba3e5268391f40fa845e4422113276e2b094f2a /tools/objc | |
parent | 51c64c2b673e0b6a800674c3b8701a89d760ee5b (diff) |
Replace dummy.c with dummy.m to allow preprocessing of objc source code to import objc frameworks.
--
MOS_MIGRATED_REVID=114761121
Diffstat (limited to 'tools/objc')
-rw-r--r-- | tools/objc/BUILD | 4 | ||||
-rw-r--r-- | tools/objc/objc_dummy.m | 25 |
2 files changed, 28 insertions, 1 deletions
diff --git a/tools/objc/BUILD b/tools/objc/BUILD index 4b6b56c417..3b7f489e9f 100644 --- a/tools/objc/BUILD +++ b/tools/objc/BUILD @@ -122,5 +122,7 @@ py_library( objc_library( name = "dummy_lib", - srcs = ["dummy.c"], + srcs = [ + "objc_dummy.m", + ], ) diff --git a/tools/objc/objc_dummy.m b/tools/objc/objc_dummy.m new file mode 100644 index 0000000000..6a2128333f --- /dev/null +++ b/tools/objc/objc_dummy.m @@ -0,0 +1,25 @@ +// Copyright 2015 The Bazel Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/* + * Include this file in a target if it requires some source but you don't have + * any. + * + * ios_extension_binary rules only generate a static library Xcode target, and + * the ios_extension will generate an actual bundling Xcode target. Application + * and app extension targets need at least one source file for Xcode to be + * happy, so we can add this file for them. + */ + +static int dummy __attribute__((unused,used)) = 0; |