Skip to content

Commit

Permalink
Add community triple arm64-linux and arm-linux. (microsoft#11880)
Browse files Browse the repository at this point in the history
Verify the following command on both 32 bits and 64 bits OS on Raspberry pi 3.

    ./bootstrap-vcpkg.sh
    ./vcpkg install boost
  • Loading branch information
xieyubo committed Sep 5, 2020
1 parent c87bf15 commit e379c8e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/vcpkg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,14 @@ int main(const int argc, const char* const* const argv)

load_config(fs);

#if (defined(__aarch64__) || defined(__arm__) || defined(_M_ARM) || defined(_M_ARM64)) && !defined(_WIN32)
if (!System::get_environment_variable("VCPKG_FORCE_SYSTEM_BINARIES").has_value())
{
Checks::exit_with_message(VCPKG_LINE_INFO,
"Environment variable VCPKG_FORCE_SYSTEM_BINARIES must be set on arm platform.");
}
#endif

VcpkgCmdArguments args = VcpkgCmdArguments::create_from_command_line(fs, argc, argv);
args.imbue_from_environment();
args.check_feature_flag_consistency();
Expand Down
6 changes: 6 additions & 0 deletions src/vcpkg/triplet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,13 @@ namespace vcpkg
#elif defined(__FreeBSD__)
return Triplet::from_canonical_name("x64-freebsd");
#elif defined(__GLIBC__)
#if defined(__aarch64__)
return Triplet::from_canonical_name("arm64-linux");
#elif defined(__arm__)
return Triplet::from_canonical_name("arm-linux");
#else
return Triplet::from_canonical_name("x64-linux");
#endif
#else
return Triplet::from_canonical_name("x64-linux-musl");
#endif
Expand Down

0 comments on commit e379c8e

Please sign in to comment.