From 828e6b4f205e8e0ad8b8893abc29bf5fa755aedb Mon Sep 17 00:00:00 2001 From: Cole Faust Date: Thu, 18 Jan 2024 12:41:16 -0800 Subject: [PATCH] Remove SymlinkOutputs symlink_outputs was added so bazel could run ninja files, but we abanoned that approach in roboleaf, and then roboleaf was cancelled entirely. Remove this feature so we're more compatible with upstream ninja / n2. Bug: 160568334 Test: Presubmits Change-Id: Ie3afd084c5574444dddac77cba1866e82ff2ca19 --- ninja_defs.go | 35 +++++++++-------------------------- 1 file changed, 9 insertions(+), 26 deletions(-) diff --git a/ninja_defs.go b/ninja_defs.go index a1a3124..0259185 100644 --- a/ninja_defs.go +++ b/ninja_defs.go @@ -56,16 +56,15 @@ type PoolParams struct { // definition. type RuleParams struct { // These fields correspond to a Ninja variable of the same name. - Command string // The command that Ninja will run for the rule. - Depfile string // The dependency file name. - Deps Deps // The format of the dependency file. - Description string // The description that Ninja will print for the rule. - Generator bool // Whether the rule generates the Ninja manifest file. - Pool Pool // The Ninja pool to which the rule belongs. - Restat bool // Whether Ninja should re-stat the rule's outputs. - Rspfile string // The response file. - RspfileContent string // The response file content. - SymlinkOutputs []string // The list of Outputs or ImplicitOutputs that are symlinks. + Command string // The command that Ninja will run for the rule. + Depfile string // The dependency file name. + Deps Deps // The format of the dependency file. + Description string // The description that Ninja will print for the rule. + Generator bool // Whether the rule generates the Ninja manifest file. + Pool Pool // The Ninja pool to which the rule belongs. + Restat bool // Whether Ninja should re-stat the rule's outputs. + Rspfile string // The response file. + RspfileContent string // The response file content. // These fields are used internally in Blueprint CommandDeps []string // Command-specific implicit dependencies to prepend to builds @@ -85,7 +84,6 @@ type BuildParams struct { Rule Rule // The rule to invoke. Outputs []string // The list of explicit output targets. ImplicitOutputs []string // The list of implicit output targets. - SymlinkOutputs []string // The list of Outputs or ImplicitOutputs that are symlinks. Inputs []string // The list of explicit input dependencies. Implicits []string // The list of implicit input dependencies. OrderOnly []string // The list of order-only dependencies. @@ -207,15 +205,6 @@ func parseRuleParams(scope scope, params *RuleParams) (*ruleDef, r.Variables["rspfile_content"] = value } - if len(params.SymlinkOutputs) > 0 { - value, err = parseNinjaString(scope, strings.Join(params.SymlinkOutputs, " ")) - if err != nil { - return nil, fmt.Errorf("error parsing SymlinkOutputs param: %s", - err) - } - r.Variables["symlink_outputs"] = value - } - r.CommandDeps, err = parseNinjaStrings(scope, params.CommandDeps) if err != nil { return nil, fmt.Errorf("error parsing CommandDeps param: %s", err) @@ -377,12 +366,6 @@ func parseBuildParams(scope scope, params *BuildParams, setVariable("description", value) } - if len(params.SymlinkOutputs) > 0 { - setVariable( - "symlink_outputs", - simpleNinjaString(strings.Join(params.SymlinkOutputs, " "))) - } - if len(tags) > 0 { setVariable("tags", simpleNinjaString(formatTags(tags, rule))) }