-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use fmt_8 from nixpkgs instead of building it from source #9131
Conversation
@Atry has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@Atry has updated the pull request. You must reimport the pull request before landing. |
@Atry has updated the pull request. You must reimport the pull request before landing. |
2a5f957
to
6a8658c
Compare
@Atry has updated the pull request. You must reimport the pull request before landing. |
@Atry has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
2 similar comments
@Atry has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@Atry has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@Atry has updated the pull request. You must reimport the pull request before landing. |
bab4978
to
1f147f7
Compare
@Atry has updated the pull request. You must reimport the pull request before landing. |
1f147f7
to
1ff8f2a
Compare
@Atry has updated the pull request. You must reimport the pull request before landing. |
@Atry has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Summary: We tried to use fmt_8 from nix package in #9131, however it did not take effect because the target created by find_package is `fmt::fmt`, not `fmt`. This PR properly detect `fmt::fmt`, and create a `fmt` as a proxy to `fmt::fmt`. Pull Request resolved: #9223 Test Plan: Run GitHub Action. The following line should be included in the build log: ``` hhvm> -- Using system fmt: /nix/store/qcgg8plb11j9dcz4r22hsaps2qfq8bnm-fmt-8.1.1-dev/lib/cmake/fmt ``` See https://github.com/facebook/hhvm/actions/runs/3110469220/jobs/5041685489 Reviewed By: Wilfred Differential Revision: D39760260 Pulled By: Atry fbshipit-source-id: 5fa9b7b50560499c6162b06720ba63e33460f9f9
Currently we build
fmt
from source unconditionally, and our CMake file to buildfmt
is not compatible with nix's clang environment. An error aboutcannot find -lc++: No such file or directory
would be reported when trying to build the bundledfmt
with clang in #9129. See https://github.com/facebook/hhvm/actions/runs/3095588732/jobs/5017341496 for the build log.This diff modifies
third-party/CMakeLists.txt
, usingfind_package
to detectfmt
from the build environment, or building the bundledfmt
from source if nofmt
from the build environment is found.This PR also specifies
fmt_8
nix package, given thatfmt
in nixpkgs unstable is version 7 while we previously build HHVM with a bundled version 8 offmt
.Test Plan:
Rebase #9129 onto this diff, and there will be no error about
cannot find -lc++: No such file or directory