Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Commit 4590fb3

Browse files
committed
comment out RebuildManifest
1 parent 53571ca commit 4590fb3

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/ninja.cc

+7-6
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,12 @@ struct NinjaMain : public BuildLogUser {
142142
/// Ensure the build directory exists, creating it if necessary.
143143
/// @return false on error.
144144
bool EnsureBuildDirExists();
145-
145+
#if 0
146146
/// Rebuild the manifest, if necessary.
147147
/// Fills in \a err on error.
148148
/// @return true if the manifest was rebuilt.
149149
bool RebuildManifest(const char* input_file, string* err);
150-
150+
#endif
151151
/// Build the targets listed on the command line.
152152
/// @return an exit code.
153153
int RunBuild(int argc, char** argv);
@@ -239,7 +239,7 @@ int GuessParallelism() {
239239
return processors + 2;
240240
}
241241
}
242-
242+
#if 0
243243
/// Rebuild the build manifest, if necessary.
244244
/// Returns true if the manifest was rebuilt.
245245
bool NinjaMain::RebuildManifest(const char* input_file, string* err) {
@@ -272,7 +272,7 @@ bool NinjaMain::RebuildManifest(const char* input_file, string* err) {
272272

273273
return true;
274274
}
275-
275+
#endif
276276
Node* NinjaMain::CollectTarget(const char* cpath, string* err) {
277277
string path = cpath;
278278
uint64_t slash_bits;
@@ -1366,8 +1366,9 @@ NORETURN void real_main(int argc, char** argv) {
13661366
//TODO: make it configurable
13671367
ninja.ToolCleanDead(&options,argc,argv);
13681368

1369+
#if 0
13691370
// Attempt to rebuild the manifest before building anything else
1370-
if (false && ninja.RebuildManifest(options.input_file, &err)) {
1371+
if (ninja.RebuildManifest(options.input_file, &err)) {
13711372
// In dry_run mode the regeneration will succeed without changing the
13721373
// manifest forever. Better to return immediately.
13731374
if (config.dry_run)
@@ -1378,7 +1379,7 @@ NORETURN void real_main(int argc, char** argv) {
13781379
Error("rebuilding '%s': %s", options.input_file, err.c_str());
13791380
exit(1);
13801381
}
1381-
1382+
#endif
13821383
int result = ninja.RunBuild(argc, argv);
13831384
if (g_metrics)
13841385
ninja.DumpMetrics();

0 commit comments

Comments
 (0)