aboutsummaryrefslogtreecommitdiff
path: root/third-party
diff options
context:
space:
mode:
Diffstat (limited to 'third-party')
-rw-r--r--third-party/CMakeLists.txt7
-rw-r--r--third-party/cmake/BuildJeMalloc.cmake19
-rw-r--r--third-party/cmake/BuildLuarocks.cmake7
-rw-r--r--third-party/utfTerminalDetailed.lua27
4 files changed, 30 insertions, 30 deletions
diff --git a/third-party/CMakeLists.txt b/third-party/CMakeLists.txt
index 60a53ace8f..fde367bc72 100644
--- a/third-party/CMakeLists.txt
+++ b/third-party/CMakeLists.txt
@@ -13,6 +13,7 @@ set(DEPS_DOWNLOAD_DIR "${DEPS_BUILD_DIR}/downloads")
option(USE_BUNDLED "Use bundled dependencies." ON)
+option(USE_BUNDLED_JEMALLOC "Use the bundled jemalloc." ${USE_BUNDLED})
option(USE_BUNDLED_UNIBILIUM "Use the bundled unibilium." ${USE_BUNDLED})
option(USE_BUNDLED_LIBTERMKEY "Use the bundled libtermkey." ${USE_BUNDLED})
option(USE_BUNDLED_LIBVTERM "Use the bundled libvterm." ${USE_BUNDLED})
@@ -73,6 +74,8 @@ set(LIBTERMKEY_SHA256 21846369081e6c9a0b615f4b3889c4cb809321c5ccc6e6c1640eb138f1
set(LIBVTERM_URL https://github.com/neovim/libvterm/archive/1b745d29d45623aa8d22a7b9288c7b0e331c7088.tar.gz)
set(LIBVTERM_SHA256 3fc75908256c0d158d6c2a32d39f34e86bfd26364f5404b7d9c03bb70cdc3611)
+set(JEMALLOC_URL https://github.com/jemalloc/jemalloc/archive/3.6.0.tar.gz)
+set(JEMALLOC_SHA256 68175f729423305dc8573cb093025a8db525e1956583c7c5924416a9abaaacb6)
if(USE_BUNDLED_UNIBILIUM)
include(BuildUnibilium)
@@ -102,6 +105,10 @@ if(USE_BUNDLED_LUAROCKS)
include(BuildLuarocks)
endif()
+if(USE_BUNDLED_JEMALLOC)
+ include(BuildJeMalloc)
+endif()
+
add_custom_target(third-party ALL
COMMAND ${CMAKE_COMMAND} -E touch .third-party
DEPENDS ${THIRD_PARTY_DEPS})
diff --git a/third-party/cmake/BuildJeMalloc.cmake b/third-party/cmake/BuildJeMalloc.cmake
new file mode 100644
index 0000000000..ceb7de41e9
--- /dev/null
+++ b/third-party/cmake/BuildJeMalloc.cmake
@@ -0,0 +1,19 @@
+ExternalProject_Add(jemalloc
+ PREFIX ${DEPS_BUILD_DIR}
+ URL ${JEMALLOC_URL}
+ DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/jemalloc
+ DOWNLOAD_COMMAND ${CMAKE_COMMAND}
+ -DPREFIX=${DEPS_BUILD_DIR}
+ -DDOWNLOAD_DIR=${DEPS_DOWNLOAD_DIR}/jemalloc
+ -DURL=${JEMALLOC_URL}
+ -DEXPECTED_SHA256=${JEMALLOC_SHA256}
+ -DTARGET=jemalloc
+ -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/DownloadAndExtractFile.cmake
+ BUILD_IN_SOURCE 1
+ CONFIGURE_COMMAND sh ${DEPS_BUILD_DIR}/src/jemalloc/autogen.sh &&
+ ${DEPS_BUILD_DIR}/src/jemalloc/configure --with-jemalloc-prefix=je_
+ --enable-cc-silence CC=${DEPS_C_COMPILER} --prefix=${DEPS_INSTALL_DIR}
+ BUILD_COMMAND ""
+ INSTALL_COMMAND ${MAKE_PRG} install_include install_lib)
+
+list(APPEND THIRD_PARTY_DEPS jemalloc)
diff --git a/third-party/cmake/BuildLuarocks.cmake b/third-party/cmake/BuildLuarocks.cmake
index baa3425918..fabceac3d8 100644
--- a/third-party/cmake/BuildLuarocks.cmake
+++ b/third-party/cmake/BuildLuarocks.cmake
@@ -56,9 +56,10 @@ add_custom_target(stable-busted-deps
add_custom_command(OUTPUT ${DEPS_BIN_DIR}/busted
COMMAND ${DEPS_BIN_DIR}/luarocks
- ARGS build https://raw.githubusercontent.com/Olivine-Labs/busted/master/busted-scm-0.rockspec CC=${DEPS_C_COMPILER} LD=${DEPS_C_COMPILER}
- COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/utfTerminalDetailed.lua
- ${DEPS_INSTALL_DIR}/share/lua/5.1/busted/outputHandlers
+ ## Drop back to:
+ ## https://raw.githubusercontent.com/Olivine-Labs/busted/master/busted-scm-0.rockspec
+ ## once the spec file is fixed in busted.
+ ARGS build https://raw.githubusercontent.com/Olivine-Labs/busted/f803173cc136f7370f7416254eaf3bada01b04a9/busted-scm-0.rockspec CC=${DEPS_C_COMPILER} LD=${DEPS_C_COMPILER}
DEPENDS stable-busted-deps)
add_custom_target(busted
DEPENDS ${DEPS_BIN_DIR}/busted)
diff --git a/third-party/utfTerminalDetailed.lua b/third-party/utfTerminalDetailed.lua
deleted file mode 100644
index 5a52dfa958..0000000000
--- a/third-party/utfTerminalDetailed.lua
+++ /dev/null
@@ -1,27 +0,0 @@
--- busted output handler that immediately prints file and test names before
--- tests are executed. It simplifies identifying which tests are
--- hanging/crashing
-if package.config:sub(1,1) == '\\' and not os.getenv("ANSICON") then
- -- Disable colors on Windows.
- colors = setmetatable({}, {__index = function() return function(s) return s end end})
-else
- colors = require 'term.colors'
-end
-
-return function(options, busted)
- local handler = require 'busted.outputHandlers.utfTerminal'(options, busted)
-
- handler.fileStart = function(name)
- io.write('\n' .. colors.cyan(name) .. ':')
- end
-
- handler.testStart = function(element, parent, status, debug)
- io.write('\n ' .. handler.getFullName(element) .. ' ... ')
- io.flush()
- end
-
- busted.subscribe({ 'file', 'start' }, handler.fileStart)
- busted.subscribe({ 'test', 'start' }, handler.testStart)
-
- return handler
-end