Skip to content

Commit

Permalink
include obj name in shared intermediate
Browse files Browse the repository at this point in the history
avoids duplicate ninja rules for v8 used in host and target
  • Loading branch information
minrk committed Feb 19, 2021
1 parent bc1c428 commit 5e533cb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tools/gyp/pylib/gyp/generator/ninja.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
# the start of a string, while $| is used for variables that can appear
# anywhere in a string.
"INTERMEDIATE_DIR": "$!INTERMEDIATE_DIR",
"SHARED_INTERMEDIATE_DIR": "$!PRODUCT_DIR/gen",
"SHARED_INTERMEDIATE_DIR": "$!PRODUCT_DIR/$|OBJ/gen",
"PRODUCT_DIR": "$!PRODUCT_DIR",
"CONFIGURATION_NAME": "$|CONFIGURATION_NAME",
# Special variables that may be used by gyp 'rule' targets.
Expand Down Expand Up @@ -289,6 +289,12 @@ def ExpandSpecial(self, path, product_dir=None):
CONFIGURATION_NAME = "$|CONFIGURATION_NAME"
path = path.replace(CONFIGURATION_NAME, self.config_name)

obj = "obj"
if self.toolset != "target":
obj += "." + self.toolset

path = path.replace("$|OBJ", obj)

return path

def ExpandRuleVariables(self, path, root, dirname, source, ext, name):
Expand Down

0 comments on commit 5e533cb

Please sign in to comment.