-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Pass PLATFORM_FLAGS in build_detect_platform #8111
Conversation
@mrambacher has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
@mrambacher has updated the pull request. You must reimport the pull request before landing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@@ -177,7 +177,7 @@ case "$TARGET_OS" in | |||
PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -lpthread -lrt -ldl" | |||
if test $ROCKSDB_USE_IO_URING; then | |||
# check for liburing | |||
$CXX $CFLAGS -x c++ - -luring -o /dev/null 2>/dev/null <<EOF | |||
$CXX $PLATFORM_CXXFLAGS -x c++ - -luring -o /dev/null 2>/dev/null <<EOF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will $PLATFORM_CXXFLAGS
still include the $CFLAGS
, if the user set it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing has really changed as to what is written to the make_config.mk file. AFAICT, CFLAGS end up in the PLATFORM_CXXFLAGS but the other options (CXXFLAGS, LDFLAGS, EXTRA_CXXFLAGS, EXTRA_LDFLAGS) do not get written to the file. They are used however when doing the build/compile.
@mrambacher has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
@mrambacher has updated the pull request. You must reimport the pull request before landing. |
@mrambacher has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
@mrambacher merged this pull request in 493a4e2. |
At least under MacOS, some things were excluded from the build (like Snappy) because the compilation flags were not passed in correctly. This PR does a few things:
Validated that the make_platform.mk file generated on Linux does not change with this change. On my MacOS machine, the SNAPPY libraries are now available (they were not before as they required --std=c++11 to build).
I also verified that I can build against TBB installed on my Mac by passing in the EXTRA CXX and LD FLAGS to the location in which TBB is installed.