diff options
author | Anton Carver <anton@google.com> | 2015-06-22 17:25:47 +0100 |
---|---|---|
committer | Anton Carver <anton@google.com> | 2015-06-23 13:19:03 +0100 |
commit | c935e8a14296be251b574c05f7df2f4b232bf987 (patch) | |
tree | 5aea094ebaaae1712149027733a1cf9e0246b943 /build | |
parent | 7fac7b1928c547fa193842bd44ed39e5108cba4b (diff) | |
download | gpu-c935e8a14296be251b574c05f7df2f4b232bf987.tar.gz |
Fix dependencies. Remove some confusing target names.
Change-Id: Id429017d9bd47bfea4e1c50754df256168ea862d
Diffstat (limited to 'build')
-rw-r--r-- | build/cpp/make_cpp.go | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/build/cpp/make_cpp.go b/build/cpp/make_cpp.go index 824c93b4b..75721ec3d 100644 --- a/build/cpp/make_cpp.go +++ b/build/cpp/make_cpp.go @@ -49,7 +49,9 @@ func makeStep(name string, output build.File, source build.FileSet, always bool, if always { s.AlwaysRun() } - maker.List(name).DependsOn(e) + if name != "" { + maker.List("cc:" + name).DependsOn(e) + } maker.List("cc").DependsOn(e) return s } @@ -82,7 +84,7 @@ func MakeCompile(sources build.FileSet, cfg Config, env build.Environment) build // skip any objects which have existing build steps continue } - s := makeStep(cfg.Name, object, build.Files(source), env.ForceBuild, + s := makeStep("", object, build.Files(source), env.ForceBuild, func(*maker.Step) error { env.Logger = env.Logger.Enter(object.Name()) env.Logger.Enter("C++.Compile") @@ -118,7 +120,7 @@ func MakeStaticLibrary(inputs build.FileSet, cfg Config, env build.Environment) output = output.ChangeExt(*cfg.OutputExt) } - makeStep(cfg.Name, output, objects, env.ForceBuild, + makeStep("", output, objects, env.ForceBuild, func(*maker.Step) error { env.Logger = logger(env, cfg.Name).Enter("C++.StaticLibrary") return cfg.Toolchain.Archiver(objects, output, cfg, env) @@ -196,9 +198,9 @@ func MakeExecutable(inputs build.FileSet, cfg Config, env build.Environment) bui func MakeRunTest(test build.File, cfg Config) { // We only run tests on the host OS. if cfg.OS == maker.HostOS { - phony := maker.Virtual("") + phony := maker.Virtual("cc:" + test.Name() + ":run") maker.Command(makeEntity(test)).Creates(phony) - maker.List("test").DependsOn(phony) + maker.List("cc_test").DependsOn(phony) } } |