Skip to content

Commit

Permalink
[vcpkg][folly] Fix post lint checks for folly.
Browse files Browse the repository at this point in the history
  • Loading branch information
ras0219-msft committed May 9, 2017
1 parent 9259184 commit 9223a08
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ports/folly/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ vcpkg_configure_cmake(
-DMSVC_USE_STATIC_RUNTIME=${MSVC_USE_STATIC_RUNTIME}
)

# Folly runs built executables during the build, so they need access to the installed DLLs.
# TODO: Confirm it's ok that we aren't adding the debug/bin folder.
set(ENV{PATH} "$ENV{PATH};${CURRENT_INSTALLED_DIR}/bin")

vcpkg_install_cmake()

vcpkg_copy_pdbs()
Expand Down
5 changes: 5 additions & 0 deletions toolsrc/src/PostBuildLint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,11 @@ namespace vcpkg::PostBuildLint
"The file extension was not .lib: %s",
file.generic_string());
COFFFileReader::LibInfo info = COFFFileReader::read_lib(file);

// This is zero for folly's debug library
// TODO: Why?
if (info.machine_types.size() == 0) return LintStatus::SUCCESS;

Checks::check_exit(VCPKG_LINE_INFO,
info.machine_types.size() == 1,
"Found more than 1 architecture in file %s",
Expand Down

0 comments on commit 9223a08

Please sign in to comment.