Skip to content

Commit

Permalink
[vcpkg] Fix compiler tracking not pre-downloading Ninja. Fix compiler…
Browse files Browse the repository at this point in the history
… tracking not looking in -err.log.
  • Loading branch information
ras0219-msft committed Jul 12, 2020
1 parent f5b2abc commit 353b6be
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/detect_compiler/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ set(LOGS
${CURRENT_BUILDTREES_DIR}/config-${TARGET_TRIPLET}-out.log
${CURRENT_BUILDTREES_DIR}/config-${TARGET_TRIPLET}-rel-out.log
${CURRENT_BUILDTREES_DIR}/config-${TARGET_TRIPLET}-dbg-out.log
${CURRENT_BUILDTREES_DIR}/config-${TARGET_TRIPLET}-rel-err.log
${CURRENT_BUILDTREES_DIR}/config-${TARGET_TRIPLET}-dbg-err.log
)

foreach(LOG IN LISTS LOGS)
Expand All @@ -22,7 +24,5 @@ foreach(LOG IN LISTS LOGS)
if(EXISTS ${LOG})
file(READ "${LOG}" _contents)
message("${_contents}")
return()
endif()
endforeach()
message(FATAL_ERROR "Could read logs: ${LOGS}")
5 changes: 5 additions & 0 deletions toolsrc/src/vcpkg/build.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,11 @@ namespace vcpkg::Build
System::print2("Detecting compiler hash for triplet ", triplet, "...\n");
auto buildpath = paths.buildtrees / "detect_compiler";

#if !defined(_WIN32)
// TODO: remove when vcpkg.exe is in charge for acquiring tools. Change introduced in vcpkg v0.0.107.
// bootstrap should have already downloaded ninja, but making sure it is present in case it was deleted.
vcpkg::Util::unused(paths.get_tool_exe(Tools::NINJA));
#endif
std::vector<System::CMakeVariable> cmake_args{
{"CURRENT_PORT_DIR", paths.scripts / "detect_compiler"},
{"CURRENT_BUILDTREES_DIR", buildpath},
Expand Down

0 comments on commit 353b6be

Please sign in to comment.