Closed ssandler closed 1 year ago
@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
Test failure seems unrelated:
-iquote
To expand on this a little, -iquote
means "consider these paths for #include "foo"
, not just #include <foo>
"; it was used here because it has the side effect of making the include paths higher priority. In particular, it made BUILD_DIR/hphp/hack/src/.../foo.rs
(a generated C++ header file) higher priority than SOURCE_DIR/hphp/hack/src/.../foo.rs
(a rust source file). Now that HHVM's consistently using .rs.h
includes instead of .rs
, this prioritization is not needed and CMake's standard include directory management can be used instead.
@Wilfred merged this pull request in facebook/hhvm@1512f9098c977aa5d6b5f24f80220cd8d111c318.
This resolves a build failure which occurs on Ubuntu 18.04 with cmake 3.10. It may occur on other distros and with other cmake versions as well. The error is:
Using
CMAKE_VERBOSE_MAKEFILE
, the compilation command forexternal_decl_provider.cpp
ends in:The
-iquote
option is deduplicated, but this deduplication breaks the compilation and the necessary directory is not included.However, my understanding is that this
-iquote
was put in place from a time when HHVM was importing.rs
files directly, and after this commit we shouldn't need to usetarget_compile_options()
like this anymore and can usetarget_include_directories()
instead.I confirmed that this commit resolves that error.