Skip to content

Commit

Permalink
getdeps: enable -fcoroutines for GCC in fb303 and eden
Browse files Browse the repository at this point in the history
Summary:
X-link: facebookincubator/zstrong#1019

Enable coroutines on GCC for fb303 and eden OSS cmake builds to match folly and [fbthrift](https://github.com/facebook/fbthrift/blob/197890bbedd4942809b91139f9a2890c8f167045/CMakeLists.txt#L64-L75).  This stops the eden tests from immediatedly core dumping when they try to open up the thrift server

So can check if core dumps:
   * fix to eden main.py to stub par_telemetry in OSS where its not available
   * add the missing getdeps dependency from eden to sapling for tests (it needs the sapling binaries for the tests torun)

Reviewed By: jdelliot

Differential Revision: D64911998

fbshipit-source-id: f6316908314bd821dd8c0e5afb5fe4584f5be23e
  • Loading branch information
ahornby authored and facebook-github-bot committed Oct 24, 2024
1 parent 6cb34b6 commit 1b17c82
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
13 changes: 11 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,19 @@ option(PYTHON_EXTENSIONS
ON
)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
message(STATUS "setting C++ standard to C++${CMAKE_CXX_STANDARD}")
endif()
set(CMAKE_CXX_EXTENSIONS OFF)

# Explicitly enable coroutine support, since GCC does not enable it
# by default when targeting C++17.
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-fcoroutines>)
endif()

set(INCLUDE_INSTALL_DIR include CACHE STRING
"The subdirectory where header files should be installed")
set(LIB_INSTALL_DIR lib CACHE STRING
Expand Down
4 changes: 4 additions & 0 deletions build/fbcode_builder/manifests/eden
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ python
# TODO: teach getdeps to compile lmdb on Windows.
lmdb

[dependencies.test=on]
# sapling CLI is needed to run the tests
sapling

[shipit.pathmap.fb=on]
# for internal builds that use getdeps
fbcode/fb303 = fb303
Expand Down

0 comments on commit 1b17c82

Please sign in to comment.