Permalink
Browse files

back out Dune (#8391)

Summary:
Pull Request resolved: #8391

Our Linux builds have been broken since this landed.

Fixes #8386

This is basically `hg backout` of:
1. add dune
2. try to fix dune
3. add lwt

... then manually restoring the last

Reviewed By: kmeht

Differential Revision: D13236504

fbshipit-source-id: d02407e2a7ec4f8a71d7e17c64729d390c1fb9c9
  • Loading branch information...
fredemmott authored and hhvm-bot committed Nov 28, 2018
1 parent c16c8dc commit 733eb5d7082831b6edccba88112c5f47f7d94eac
Showing with 353 additions and 2,001 deletions.
  1. +0 −3 hphp/.gitignore
  2. +89 −19 hphp/hack/CMakeLists.txt
  3. +1 −0 hphp/hack/bin/README
  4. +0 −9 hphp/hack/oss_build_quick_test.sh
  5. +248 −20 hphp/hack/src/Makefile
  6. +1 −1 hphp/hack/src/_tags
  7. +0 −6 hphp/hack/src/annotated_ast/dune
  8. +0 −8 hphp/hack/src/ast/dune
  9. +0 −22 hphp/hack/src/client/dune
  10. +0 −5 hphp/hack/src/common/dune
  11. +0 −3 hphp/hack/src/config/dune
  12. +1 −1 hphp/hack/src/decl/decl_pos_utils.ml
  13. +0 −13 hphp/hack/src/decl/dune
  14. +0 −21 hphp/hack/src/deps/dune
  15. +0 −13 hphp/hack/src/dfind/dune
  16. +0 −6 hphp/hack/src/diff/dune
  17. +0 −103 hphp/hack/src/dune
  18. +0 −1 hphp/hack/src/dune-project
  19. +0 −24 hphp/hack/src/dune_config/discover.ml
  20. +0 −13 hphp/hack/src/dune_config/dune
  21. +0 −10 hphp/hack/src/errors/dune
  22. +1 −1 hphp/hack/src/errors/errors.ml
  23. +0 −9 hphp/hack/src/facts/dune
  24. +0 −5 hphp/hack/src/find/dune
  25. +0 −9 hphp/hack/src/fsevents/dune
  26. +0 −1 hphp/hack/src/fsnotify/.gitignore
  27. +0 −4 hphp/hack/src/fsnotify/dune.in
  28. +0 −6 hphp/hack/src/fsnotify_darwin/dune
  29. +0 −6 hphp/hack/src/fsnotify_linux/dune
  30. +0 −7 hphp/hack/src/fsnotify_win/dune
  31. +0 −10 hphp/hack/src/gen_deps/dune
  32. +0 −22 hphp/hack/src/globals/dune
  33. +0 −8 hphp/hack/src/hackfmt/debug/dune
  34. +0 −46 hphp/hack/src/hackfmt/dune
  35. +0 −3 hphp/hack/src/hackfmt/error/dune
  36. +0 −34 hphp/hack/src/heap/config/discover.ml
  37. +0 −9 hphp/hack/src/heap/config/dune
  38. +0 −52 hphp/hack/src/heap/dune
  39. +0 −12 hphp/hack/src/hhbc/dune
  40. +0 −8 hphp/hack/src/hhi/dune
  41. +0 −20 hphp/hack/src/ide_rpc/dune
  42. +0 −3 hphp/hack/src/injection/default_injector/dune
  43. +0 −9 hphp/hack/src/libancillary/dune
  44. +0 −16 hphp/hack/src/monitor/dune
  45. +0 −73 hphp/hack/src/naming/dune
  46. +0 −1 hphp/hack/src/options/.gitignore
  47. +0 −43 hphp/hack/src/options/dune
  48. +0 −7 hphp/hack/src/parser/coroutine/dune
  49. +0 −223 hphp/hack/src/parser/dune
  50. +2 −2 hphp/hack/src/parser/full_fidelity_syntax_error.ml
  51. +0 −3 hphp/hack/src/parser/html_entities.ml
  52. +0 −7 hphp/hack/src/parser/ppl/dune
  53. +0 −16 hphp/hack/src/parser/schema/dune
  54. +0 −9 hphp/hack/src/parser/smart_constructors/dune
  55. +0 −9 hphp/hack/src/ppx/dune
  56. +6 −28 hphp/hack/src/ppx/ppx_gen_hhi.ml
  57. +0 −10 hphp/hack/src/ppx/ppx_gen_hhi_direct.ml
  58. +0 −25 hphp/hack/src/procs/dune
  59. +0 −12 hphp/hack/src/search/dune
  60. +0 −229 hphp/hack/src/server/dune
  61. +0 −8 hphp/hack/src/socket/dune
  62. +0 −103 hphp/hack/src/stubs/dune
  63. +0 −4 hphp/hack/src/third-party/avl/dune
  64. +0 −3 hphp/hack/src/third-party/core/dune
  65. +0 −5 hphp/hack/src/third-party/inotify/dune
  66. +0 −8 hphp/hack/src/third-party/libancillary/dune
  67. +0 −195 hphp/hack/src/typing/dune
  68. +0 −10 hphp/hack/src/typing/tast_check/dune
  69. +0 −3 hphp/hack/src/utils/collections/dune
  70. +0 −22 hphp/hack/src/utils/config/dune
  71. +0 −8 hphp/hack/src/utils/config_file/dune
  72. +0 −6 hphp/hack/src/utils/disk/dune
  73. +0 −226 hphp/hack/src/utils/dune
  74. +0 −7 hphp/hack/src/utils/hashlib/dune
  75. +0 −8 hphp/hack/src/utils/hg/dune
  76. +0 −6 hphp/hack/src/utils/hh_json/dune
  77. +0 −6 hphp/hack/src/utils/lint/dune
  78. +0 −14 hphp/hack/src/utils/parent/dune
  79. +0 −9 hphp/hack/src/utils/process/dune
  80. +3 −3 hphp/hack/src/utils/process/process.ml
  81. +0 −19 hphp/hack/src/utils/sys/dune
  82. +1 −1 hphp/hack/src/utils/sys/sys_utils.ml
  83. +0 −23 hphp/hack/src/watchman/dune
  84. +0 −6 hphp/hack/src/watchman_event_watcher/dune
@@ -44,6 +44,3 @@ TAGS
# gdb
.gdb_history
tools/gdb/hhvm-gdb
*.merlin
*_build*
@@ -15,6 +15,82 @@ if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_LIST_DIR}")
set(HACK_ONLY_BUILD TRUE)
endif()
if (HACK_ONLY_BUILD)
# Woah - this is special. They're running cmake in the hack directory
# itself so we don't have our usual set up.
get_filename_component(HPHP_HOME "${CMAKE_CURRENT_LIST_DIR}/../.." ABSOLUTE)
set(TP_DIR "${HPHP_HOME}/third-party")
set(TP_BUILD_DIR ${TP_DIR})
if(NOT EXISTS "${TP_DIR}/CMakeLists.txt")
message(FATAL_ERROR
"${TP_DIR}/CMakeLists.txt missing. Try updating your submodule with:\n"
" rm -r ${TP_DIR}\n"
" git submodule update --init --recursive\n"
)
endif()
endif()
find_package(LZ4)
find_package(LibElf)
if (HACK_ONLY_BUILD AND NOT LZ4_FOUND)
add_subdirectory("${TP_DIR}/lz4" "${TP_DIR}/lz4" EXCLUDE_FROM_ALL)
endif()
if (HACK_ONLY_BUILD)
add_subdirectory("${TP_DIR}/ocaml" "${TP_DIR}/ocaml" EXCLUDE_FROM_ALL)
endif()
if (HACK_ONLY_BUILD AND NOT PC_SQLITE3_FOUND)
add_subdirectory(
"${TP_DIR}/libsqlite3"
"${TP_DIR}/libsqlite3"
EXCLUDE_FROM_ALL)
endif()
# This is totally the wrong way to do this, but I am tired of fighting with
# build systems and don't really care to make this work the right way.
# lz4 and sqlite3 are all we need right now anyways.
unset(extra_include_paths)
unset(extra_lib_paths)
unset(extra_cc_flags)
# Allows '#include "hphp/path/to/library/"' paths to start from hphp
# project directory which is consistent with fbmake's include paths.
IF(HPHP_HOME)
list(APPEND extra_include_paths ${HPHP_HOME})
ELSE()
list(APPEND extra_include_paths ${CMAKE_CURRENT_SOURCE_DIR}/../..)
ENDIF()
list(APPEND extra_cc_flags -pthread)
if(LZ4_FOUND)
list(APPEND extra_include_paths ${LZ4_INCLUDE_DIR})
get_filename_component(pth ${LZ4_LIBRARY} PATH)
list(APPEND extra_lib_paths ${pth})
list(APPEND extra_native_libraries "lz4")
else()
list(APPEND extra_include_paths "${TP_DIR}/lz4/src/lib")
# If LZ4_FOUND is false either we didn't find lz4 or we found it but it's the
# wrong version. We can't just add the new path and a native_lib because we
# can't control the order (and -l won't accept the raw path to the lib). By
# doing it this way we specify the path explicitly.
list(APPEND extra_link_opts "$<TARGET_LINKER_FILE:lz4>")
endif()
if(PC_SQLITE3_FOUND)
list(APPEND extra_include_paths ${LIBSQLITE3_INCLUDE_DIR})
get_filename_component(pth ${LIBSQLITE3_LIBRARY} PATH)
list(APPEND extra_lib_paths ${pth})
else()
list(APPEND extra_include_paths "${TP_DIR}/libsqlite3")
list(APPEND extra_lib_paths "${TP_BUILD_DIR}/libsqlite3")
endif()
list(APPEND extra_native_libraries "sqlite3")
# Xcode/Ninja generators undefined MAKE
if(NOT MAKE)
set(MAKE make)
@@ -29,40 +105,39 @@ add_custom_target(
)
add_dependencies(opam.stamp ocaml)
if (SKIP_OPAM)
set(OPAMROOT "~/.opam")
else ()
set(OPAMROOT "${CMAKE_CURRENT_SOURCE_DIR}/src/_build/.opam")
endif()
add_custom_target(
hack
ALL
COMMAND
export OPAMROOT=${OPAMROOT} &&
export OPAMROOT=${CMAKE_CURRENT_SOURCE_DIR}/src/_build/.opam &&
export OCAMLFIND_COMMANDS="-ocamlc=${OCAMLC_EXECUTABLE} -ocamlopt=${OCAMLOPT_EXECUTABLE}" &&
PATH="${TP_BUILD_DIR}/ocaml/build/bin:$(PATH)"
opam config exec --
$(MAKE)
$(MAKE) EXTRA_INCLUDE_PATHS="${extra_include_paths}"
EXTRA_LIB_PATHS="${extra_lib_paths}"
EXTRA_LINK_OPTS="${extra_link_opts}"
EXTRA_CC_FLAGS="${extra_cc_flags}"
EXTRA_NATIVE_LIBRARIES="${extra_native_libraries}"
BYTECODE="${EMIT_OCAML_BYTECODE}"
OCAML="${OCAML_EXECUTABLE}"
OCAMLC="${OCAMLC_EXECUTABLE}"
OCAMLBUILD="${OCAMLBUILD_EXECUTABLE}"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src"
)
add_dependencies(hack ocaml)
if (NOT SKIP_OPAM)
add_dependencies(hack opam.stamp)
endif()
add_dependencies(hack ocaml opam.stamp)
add_custom_target(
hack_test
COMMAND
export OPAMROOT=${OPAMROOT} &&
export OPAMROOT=${CMAKE_CURRENT_SOURCE_DIR}/src/_build/.opam &&
export OCAMLFIND_COMMANDS="-ocamlc=${OCAMLC_EXECUTABLE} -ocamlopt=${OCAMLOPT_EXECUTABLE}" &&
PATH="${TP_BUILD_DIR}/ocaml/build/bin:$(PATH)"
opam config exec --
$(MAKE) test
$(MAKE) test EXTRA_INCLUDE_PATHS="${extra_include_paths}"
EXTRA_LIB_PATHS="${extra_lib_paths}"
EXTRA_LINK_OPTS="${extra_link_opts}"
EXTRA_CC_FLAGS="${extra_cc_flags}"
EXTRA_NATIVE_LIBRARIES="${extra_native_libraries}"
BYTECODE="${EMIT_OCAML_BYTECODE}"
OCAML="${OCAML_EXECUTABLE}"
OCAMLC="${OCAMLC_EXECUTABLE}"
@@ -91,11 +166,6 @@ configure_file(
ESCAPE_QUOTES
)
configure_file(
"src/fsnotify/dune.in"
"${CMAKE_CURRENT_SOURCE_DIR}/src/fsnotify/dune"
)
install(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/bin/hh_client
DESTINATION bin
COMPONENT dev)
@@ -0,0 +1 @@
THE PLACE WHERE WE PUT THE BINARIES

This file was deleted.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 733eb5d

Please sign in to comment.