Commit b09b491f authored by inglorion's avatar inglorion Committed by Commit Bot

goma_link: add phony rules for native object files

crrev.com/c/2271896 changed the ninja files that are generated by
goma_link to build .o.stamp files for native object files, instead
of .o files directly. The present change adds phony rules with the
.o name, so that you can use ninja foo.o to build foo.o, instead
of having to write ninja foo.o.stamp.

Bug: 1072888
Change-Id: I14d5f33a1b1ccc6677e58fb6efa4c8a02981e9de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2274864
Commit-Queue: Bob Haarman <inglorion@chromium.org>
Reviewed-by: default avatarGeorge Burgess <gbiv@chromium.org>
Cr-Commit-Position: refs/heads/master@{#784174}
parent 574d5ba4
...@@ -596,13 +596,15 @@ class GomaLinkBase(object): ...@@ -596,13 +596,15 @@ class GomaLinkBase(object):
for tup in params.codegen: for tup in params.codegen:
obj, bitcode, index = tup obj, bitcode, index = tup
stamp = obj + '.stamp' stamp = obj + '.stamp'
native_link_deps.append(stamp) native_link_deps.append(obj)
f.write( f.write(
('\nbuild %s : codegen %s %s\n' ('\nbuild %s : codegen %s %s\n'
' bitcode = %s\n' ' bitcode = %s\n'
' index = %s\n' ' index = %s\n'
' native = %s\n') % ' native = %s\n'
tuple(map(ninjaenc, (stamp, bitcode, index, bitcode, index, obj)))) '\nbuild %s : phony %s\n') % tuple(
map(ninjaenc,
(stamp, bitcode, index, bitcode, index, obj, obj, stamp))))
f.write(('\nbuild %s : native-link %s\n' f.write(('\nbuild %s : native-link %s\n'
' rspname = %s\n params = %s\n') % ' rspname = %s\n params = %s\n') %
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment