Skip to content

Commit

Permalink
Use //external:objc_proto_lib instead of a googlemac path for objc_pr…
Browse files Browse the repository at this point in the history
…oto_library

--
MOS_MIGRATED_REVID=88964412
  • Loading branch information
illicitonion authored and hanwen committed Mar 20, 2015
1 parent 5db7899 commit 231dd79
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,9 @@ Optional options file to apply to protos which affects compilation (e.g. class
${SYNOPSIS}
<!-- #END_BLAZE_RULE.ATTRIBUTE -->*/
.add(attr(OUTPUT_CPP_ATTR, BOOLEAN).value(false))
// TODO(bazel-team): Use //external:objc_proto_lib when bind() support is a little better
.add(attr(LIBPROTOBUF_ATTR, LABEL).allowedRuleClasses("objc_library")
.value(env.getLabel(
"//googlemac/ThirdParty/ProtocolBuffers2/objectivec:ProtocolBuffers_lib")))
"//external:objc_proto_lib")))
.add(attr("$xcodegen", LABEL).cfg(HOST).exec()
.value(env.getLabel("//tools/objc:xcodegen")))
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@ public Path create(String relativePath, String... lines) throws IOException {
return path;
}

public Path overwrite(String relativePath, String... lines) throws IOException {
Path path = rootDirectory.getRelative(relativePath);
if (path.exists()) {
FileSystemUtils.deleteTree(path);
}
return create(relativePath, lines);
}

/**
* Links a tool into the workspace by creating a symbolic link to a real file. The target location
* in the workspace uses the same relative path as the given path to the tool in the runfiles
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ protected void setUp() throws Exception {
scratch = new Scratch(createFileSystem());
outputBase = scratch.dir("/usr/local/google/_blaze_jrluser/FAKEMD5/");
rootDirectory = scratch.dir("/" + TestConstants.TEST_WORKSPACE_DIRECTORY);
scratchFile(rootDirectory.getRelative("WORKSPACE").getPathString());
scratchFile(rootDirectory.getRelative("WORKSPACE").getPathString(),
"bind(",
" name = 'objc_proto_lib',",
" actual = '//objcproto:ProtocolBuffers_lib',",
")");
copySkylarkFilesIfExist();
actionOutputBase = scratch.dir("/usr/local/google/_blaze_jrluser/FAKEMD5/action_out/");
eventCollector = new EventCollector(EventKind.ERRORS_AND_WARNINGS);
Expand Down

0 comments on commit 231dd79

Please sign in to comment.