| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "tools/gn/toolchain_manager.h" | 5 #include "tools/gn/toolchain_manager.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 scope->SetValue("is_mac", Value(NULL, 1), NULL); | 36 scope->SetValue("is_mac", Value(NULL, 1), NULL); |
| 37 #else | 37 #else |
| 38 scope->SetValue("is_mac", Value(NULL, 0), NULL); | 38 scope->SetValue("is_mac", Value(NULL, 0), NULL); |
| 39 #endif | 39 #endif |
| 40 | 40 |
| 41 #if defined(OS_LINUX) | 41 #if defined(OS_LINUX) |
| 42 scope->SetValue("is_linux", Value(NULL, 1), NULL); | 42 scope->SetValue("is_linux", Value(NULL, 1), NULL); |
| 43 #else | 43 #else |
| 44 scope->SetValue("is_linux", Value(NULL, 0), NULL); | 44 scope->SetValue("is_linux", Value(NULL, 0), NULL); |
| 45 #endif | 45 #endif |
| 46 | |
| 47 // Set this value without the terminating slash because the code expects | |
| 48 // $root_output_dir/foo to work. | |
| 49 scope->SetValue(ScopePerFileProvider::kRootOutputDirName, | |
| 50 ScopePerFileProvider::GetRootOutputDir(&settings), | |
| 51 NULL); | |
| 52 scope->SetValue(ScopePerFileProvider::kRootGenDirName, | |
| 53 ScopePerFileProvider::GetRootGenDir(&settings), | |
| 54 NULL); | |
| 55 } | 46 } |
| 56 | 47 |
| 57 } // namespace | 48 } // namespace |
| 58 | 49 |
| 59 struct ToolchainManager::Info { | 50 struct ToolchainManager::Info { |
| 60 Info(const BuildSettings* build_settings, | 51 Info(const BuildSettings* build_settings, |
| 61 const Label& toolchain_name, | 52 const Label& toolchain_name, |
| 62 const std::string& output_subdir_name) | 53 const std::string& output_subdir_name) |
| 63 : state(TOOLCHAIN_SETTINGS_NOT_LOADED), | 54 : state(TOOLCHAIN_SETTINGS_NOT_LOADED), |
| 64 toolchain(toolchain_name), | 55 toolchain(toolchain_name), |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 if (err.has_error()) | 488 if (err.has_error()) |
| 498 g_scheduler->FailWithError(err); | 489 g_scheduler->FailWithError(err); |
| 499 } | 490 } |
| 500 | 491 |
| 501 g_scheduler->DecrementWorkCount(); | 492 g_scheduler->DecrementWorkCount(); |
| 502 } | 493 } |
| 503 | 494 |
| 504 base::Lock& ToolchainManager::GetLock() const { | 495 base::Lock& ToolchainManager::GetLock() const { |
| 505 return build_settings_->item_tree().lock(); | 496 return build_settings_->item_tree().lock(); |
| 506 } | 497 } |
| OLD | NEW |