• Home
  • Raw
  • Download

Lines Matching +full:ninja +full:- +full:build

3 # Use of this source code is governed by a BSD-style license that can be
6 """This script provides methods for clobbering build directories."""
16 """Extracts from a build.ninja the commands to run GN.
18 The commands to run GN are the gn rule and build.ninja build step at the
19 top of the build.ninja file. We want to keep these when deleting GN builds
20 since we want to preserve the command-line flags to GN.
25 # Reads until the first empty line after the "build build.ninja:" target.
31 if line.startswith('build build.ninja:'):
39 # For unknown reasons (anti-virus?) rmtree of Chromium build directories
48 # Remove files/sub directories individually instead of recreating the build
49 # dir because it fails when the build dir is symlinked or mounted.
58 # GN writes a build.ninja.d file. Note that not all GN builds have args.gn.
59 build_ninja_d_file = os.path.join(build_dir, 'build.ninja.d')
66 # write a dummy build.ninja file that will automatically rerun GN the next
67 # time Ninja is run.
68 build_ninja_file = os.path.join(build_dir, 'build.ninja')
81 # and we still want to restore args.gn/build.ninja/build.ninja.d, so catch
83 # We manually rm files inside the build dir rather than using "gn clean/gen"
94 # Write the build.ninja file sufficiently to regenerate itself.
95 with open(os.path.join(build_dir, 'build.ninja'), 'w') as f:
99 # Couldn't parse the build.ninja file, write a default thing.
103 command = gn -q gen //out/%s/
104 description = Regenerating ninja files
106 build build.ninja: gn
108 depfile = build.ninja.d
111 # Write a .d file for the build which references a nonexistant file. This
112 # will make Ninja always mark the build as dirty.
114 f.write('build.ninja: nonexistant_file.gn\n')
122 """Clobber contents of build sub directories.
124 Don't delete the directory itself: some checkouts have the build directory