From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 59C8370310; Mon, 8 Feb 2021 18:56:47 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 59C8370310 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1612799807; bh=Isx1bFwaPmjgBuYmsY1+v8f+HwfxbBfLRRfHpmzoF7g=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=MGd+A+i6NkAcvqgAcJ8SYjHCyV9F803K9MrhTyPrm8+lrHQwAYtqWxxN24V3LIQCk W7N9RUdcp7sEinbQT/9OZDQuz/aCOTqBF18Kqm452pUD/dzHfyipmkt+JLk2c5k4fG SVWzCefqO1vDGCsXJjDOE9RuKw6KAg+OiGBxlv9s= Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 1E5D96C1BE for ; Mon, 8 Feb 2021 18:56:46 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 1E5D96C1BE Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1l98tz-0007i6-U4; Mon, 08 Feb 2021 18:56:40 +0300 Date: Mon, 8 Feb 2021 18:56:38 +0300 To: Timur Safin Message-ID: <20210208155638.GB5448@tarantool.org> References: <7cd42be38d86c832ecd4ba0f3edd7ae83aead7ad.1612291495.git.imun@tarantool.org> <11be01d6fb48$9d0e1050$d72a30f0$@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <11be01d6fb48$9d0e1050$d72a30f0$@tarantool.org> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.10.1 (2018-07-13) X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD953AC099BC0052A9C3D690943982D6E894AC6DB5C833CB876182A05F538085040B7EE737D975D51FA617719D68DE2AFE113BF4C33E1FFB8AC9F7D8BF1CBD0CF1F X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE78BAADB77C21FF6F2EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006372521E7C1CE72986C8638F802B75D45FF5571747095F342E8C7A0BC55FA0FE5FC92A7252287DEBD855AE9A83EFDDC81E25C23028D8C25A2AB389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C07E7E81EEA8A9722B8941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B6957A4DEDD2346B42CC7F00164DA146DA6F5DAA56C3B73B23C77107234E2CFBA567F23339F89546C55F5C1EE8F4F765FC766974BC9587893D75ECD9A6C639B01BBD4B6F7A4D31EC0BC0CAF46E325F83A522CA9DD8327EE4930A3850AC1BE2E7355E1C53F199C2BB95B5C8C57E37DE458B4C7702A67D5C3316FA3894348FB808DB48C21F01D89DB561574AF45C6390F7469DAA53EE0834AAEE X-C1DE0DAB: 0D63561A33F958A556B22C01E1BA4F93BE1BF76CFA11BAC032C609EE34C47333D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75448CF9D3A7B2C848410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3454CC76E5F54B410C6C4AAB1832B0B18A4A47DA7DCD85053BE1ECAAA9C21E80B55FEF78619D4664601D7E09C32AA3244C066E89221A1B2317E2EBD3EBBFBAF40C7101BF96129E4011927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojMxr0zTsJFiTZZdfPfJQNYg== X-Mailru-Sender: 689FA8AB762F73936BC43F508A063822C4B630317D5371EA8887C5957A2DC771A7C8D0F45F857DBFE9F1EFEE2F478337FB559BB5D741EB964C8C2C849690F8E70A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 2/5] build: replace GNU Make with CMake X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Igor Munkin via Tarantool-patches Reply-To: Igor Munkin Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Timur, Thanks for your review! On 05.02.21, Timur Safin wrote: > Few preliminary observations below... > > : From: Igor Munkin > : Subject: [PATCH luajit 2/5] build: replace GNU Make with CMake > : > ... > > : > : diff --git a/.gitignore b/.gitignore > : index 1a07bf7..a21ee1c 100644 > : --- a/.gitignore > : +++ b/.gitignore > : @@ -1,5 +1,5 @@ > : *.[oa] > : -*.so > : +*.so* > : *.obj > : *.lib > : *.exp > : @@ -9,3 +9,13 @@ > : *.dmp > : *.swp > : .tags > : + > : +# CMake generated artefacts > : +CMakeCache.txt > : +CMakeFiles > : +Makefile > : +cmake_install.cmake > : +compile_commands.json > : +install_manifest.txt > : +luajit-parse-memprof > : +luajit.pc > > Uh-oh, this ugly hack would be handled by single exclusion > build*/ > if we would all use the same (idiomatic) approach for out-of-source > build. But we do not yet accustomed to that, so... never mind! I personally prefer mechanisms to policies: this approach allows one to freely name so called directory on his own e.g. , , or even , that is my favourite one. Furthermore this approach allows to ignore CMake output for both out-of-source and in-source build. Such configuration is much more flexible, IMHO, and leads to a neglible and well localized changes in .gitignore. But, nevermind ;) > > : diff --git a/CMakeLists.txt b/CMakeLists.txt > : new file mode 100644 > : index 0000000..0dba5d8 > : --- /dev/null > : +++ b/CMakeLists.txt > : @@ -0,0 +1,261 @@ > : +# LuaJIT -- interpreter and JIT compiler for Lua language. > : +# This is the main entry point for building, testing and > : +# packaging the project. > : +# Major portions taken verbatim or adapted from the uJIT. > : +# Copyright (C) 2015-2019 IPONWEB Ltd. > > 2019, IPONWEB? This weekend Anton finally merged my PR[1] with the bump of copyright year, so these notes have to be fixed now. As for the flower box per se, you can see this practice is widely used by Mike for the sources adapted of taken verbatim from PUC-Rio Lua sources. This is a nice gesture to mention the origin of the work we incorporated from the public domain into our trunk. Fixed, squashed, force-pushed to the branch. Diff is below: ================================================================================ diff --git a/CMakeLists.txt b/CMakeLists.txt index 62ac369..1b1234b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,8 @@ # This is the main entry point for building, testing and # packaging the project. # Major portions taken verbatim or adapted from the uJIT. -# Copyright (C) 2015-2019 IPONWEB Ltd. +# Copyright (C) 2020-2021 LuaVela Authors. +# Copyright (C) 2015-2020 IPONWEB Ltd. # --- Initial setup ------------------------------------------------------------ ================================================================================ > > ... > : +# --- Fine-tuning cmake environment --------------------------------------- > : ----- > : + > : +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") > : +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) > > Could you please remove this enforcement of CMAKE_EXPORT_COMPILE_COMMANDS here? > Agreed that this is always a good idea to generate compile_commands.json. But > disagreed that we should enforce it automatically. This is developer choice to > either generate or not this compile database. (And it's slowing down a bit cmake > generation phase on big projects. Which is not yet case here, but in any case) Nice remark, thanks! Dropped this line, squashed, force-pushed to the branch. Diff is below: ================================================================================ diff --git a/CMakeLists.txt b/CMakeLists.txt index 1b1234b..9e0c0f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,7 +31,6 @@ endif() # --- Fine-tuning cmake environment -------------------------------------------- set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") -set(CMAKE_EXPORT_COMPILE_COMMANDS ON) include(LuaJITUtils) include(SetVersion) ================================================================================ I'm not sure whether entry should be also removed from .gitignore, so please mention this explicitly if it should. > > ... > : + > : +# Features from Lua 5.2 that are unlikely to break existing code > : +# are enabled by default. Some other features that *might* break > : +# some existing code (e.g. __pairs or os.execute() return values) > : +# can be enabled here. > : +# XXX: this does not provide full compatibility with Lua 5.2 at > : +# this time. > : +option(LUAJIT_LUA52COMPAT "Compatibility with Lua 5.2" OFF) > : +if(LUAJIT_LUA52COMPAT) > : + AppendFlags(TARGET_C_FLAGS -DLUAJIT_ENABLE_LUA52COMPAT) > : +endif() > > I do not know whether we do care that much about consistency of an option names > or not care? But worth to mention that all other options do have ENABLE/DISABLE > or HAS prefix in similar contexts, but here we do not use it that way, and it's > simple LUAJIT_LUA52COMPAT. What about LUAJIT_ENABLE_LUA52COMPAT as it's > passed to compile options? (Not insist, but worth to note) Oops, nice catch, thanks! For the record: yes, we do care, at least for now. Fixed, squashed, force-pushed to the branch. Diff is below: ================================================================================ diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e0c0f4..af9f8e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -133,8 +133,8 @@ set(LUAJIT_HAS_FFI NOT LUAJIT_DISABLE_FFI) # can be enabled here. # XXX: this does not provide full compatibility with Lua 5.2 at # this time. -option(LUAJIT_LUA52COMPAT "Compatibility with Lua 5.2" OFF) -if(LUAJIT_LUA52COMPAT) +option(LUAJIT_ENABLE_LUA52COMPAT "Compatibility with Lua 5.2" OFF) +if(LUAJIT_ENABLE_LUA52COMPAT) AppendFlags(TARGET_C_FLAGS -DLUAJIT_ENABLE_LUA52COMPAT) endif() ================================================================================ > > : + > : +# Switch to harder (and slower) hash function when a collision > : +# chain in the string hash table exceeds certain length. > : +option(LUAJIT_SMART_STRINGS "Harder string hashing function" ON) > : +if(LUAJIT_SMART_STRINGS) > : + AppendFlags(TARGET_C_FLAGS -DLUAJIT_SMART_STRINGS=1) > : +endif() > > The same note about lack of ENABLE prefix in the option name. Well, again: we do care about consistency. Unfortunately, this option is provided only in our fork, so the inconsistency you're talking about was messed up years ago. I propose to port the build system as is now with no changes in the option names, but this is a nice point to refactor them and make them consistent in scope of a separate issue. Thoughts? > > : --- /dev/null > : +++ b/cmake/LuaJITUtils.cmake > : @@ -0,0 +1,31 @@ > ... > : diff --git a/cmake/MakeSourceList.cmake b/cmake/MakeSourceList.cmake > : new file mode 100644 > : index 0000000..fa455bb > : --- /dev/null > : +++ b/cmake/MakeSourceList.cmake > : @@ -0,0 +1,47 @@ > : +# Major portions taken verbatim or adapted from the uJIT. > : +# Copyright (C) 2015-2019 IPONWEB Ltd. > : +# > : +# make_source_list provides a convenient way to define a list of sources > : +# and get a list of absolute paths. > : +# > : +# Example usage: > : +# > : +# make_source_list(SOURCES_CORE > : +# SOURCES > : +# main.c > : +# test.c > : +# subdir/test2.c > : +# ) > : +# > : +# This will give you the list: > : +# "<...>/main.c;<...>/test.c;<...>/subdir/test2.c" > : +# (where `<...>` is ${CMAKE_CURRENT_SOURCE_DIR}). > : +# > : +# Absolute paths in `SOURCES` list don't get ${CMAKE_CURRENT_SOURCE_DIR} > : +# prepended to them. > : + > > Very convenient macro below! Much respect to author! Kudos to Elias Daler (I have already expressed my gratitude to him)! > > > : diff --git a/cmake/SetTargetFlags.cmake b/cmake/SetTargetFlags.cmake > : new file mode 100644 > : index 0000000..260fc6b > : --- /dev/null > : +++ b/cmake/SetTargetFlags.cmake > : @@ -0,0 +1,42 @@ > ... > : + > : +LuaJITTestArch(TESTARCH "${TARGET_C_FLAGS}") > : +LuaJITArch(LUAJIT_ARCH "${TESTARCH}") > : + > : +# Target-specific compiler options. > : +# > : +# x86/x64 only: For GCC 4.2 or higher and if you don't intend to > : +# distribute the binaries to a different machine you could also > : +# use: -march=native. > : +if(LUAJIT_ARCH STREQUAL "x86") > : + AppendFlags(TARGET_C_FLAGS -march=i686 -msse -msse2 -mfpmath=sse) > : +endif() > > FWIW -msse2 implicitly assumes -msse but if that way it used to be > in makefiles than so be it. Don't need to "improve" it. Yes, I tried to move everything making as few changes as possible. I believe there are lots of places to be "modernized" later. > ... > > > : diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt > : new file mode 100644 > : index 0000000..8ada1a4 > : --- /dev/null > : +++ b/src/CMakeLists.txt > : @@ -0,0 +1,391 @@ > : +# Building LuaJIT core: bootstrapping, VM, runtime, JIT compiler. > : +# Major portions taken verbatim or adapted from the uJIT. > : +# Copyright (C) 2015-2019 IPONWEB Ltd. > > 2019 IPONWEB? Ditto. Fixed, squashed, force-pushed to the branch. Diff is below: ================================================================================ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 209b5f0..5724c8b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,6 +1,7 @@ # Building LuaJIT core: bootstrapping, VM, runtime, JIT compiler. # Major portions taken verbatim or adapted from the uJIT. -# Copyright (C) 2015-2019 IPONWEB Ltd. +# Copyright (C) 2020-2021 LuaVela Authors. +# Copyright (C) 2015-2020 IPONWEB Ltd. # See the rationale in the root CMakeLists.txt. cmake_minimum_required(VERSION 3.1 FATAL_ERROR) ================================================================================ > > > : + > : +include(SetTargetFlags) > : +list(APPEND TARGET_LIBS m) > > ${TARGET_LIBS} below used as space separated list of words, it's probably > bad idea to operate with it as list, because we end up in trace with something > like > > ./third_party/luajit/src/CMakeLists.txt(302): target_include_directories(luajit_static PRIVATE ./build/third_party/luajit/src ) > ./third_party/luajit/src/CMakeLists.txt(305): target_link_libraries(luajit_static libluajit_static dl;m ) > Hm, I'm not quite sure what is broken by such usage, but everything is OK when I run with VERBOSE=1. Here is the related part: | $ make VERBOSE=1 | <...> | [100%] Linking C executable luajit | cd /tarantool-luajit/src && /usr/bin/cmake -E cmake_link_script CMakeFiles/luajit_static.dir/link.txt --verbose=1 | /usr/bin/cc -fomit-frame-pointer -fno-stack-protector -Wall -rdynamic -Wl,-E CMakeFiles/luajit_static.dir/luajit.c.o -o luajit libluajit.a -ldl -lm | make[2]: Leaving directory '/tarantool-luajit' | [100%] Built target luajit_static | <...> > > : +# Compiling and linking CLIs. > : + > : +add_executable(luajit_static EXCLUDE_FROM_ALL ${CLI_SOURCES}) > : +set_target_properties(luajit_static PROPERTIES > : + OUTPUT_NAME "${LUAJIT_CLI_NAME}" > : + COMPILE_FLAGS "${TARGET_C_FLAGS}" > : + LINK_FLAGS "${TARGET_BIN_FLAGS}" > : + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" > : +) > : +target_include_directories(luajit_static PRIVATE > : + ${CMAKE_CURRENT_BINARY_DIR} > : +) > : +target_link_libraries(luajit_static libluajit_static ${TARGET_LIBS}) > : + > : +add_executable(luajit_shared EXCLUDE_FROM_ALL ${CLI_SOURCES}) > : +set_target_properties(luajit_shared PROPERTIES > : + OUTPUT_NAME "${LUAJIT_CLI_NAME}" > : + COMPILE_FLAGS "${TARGET_C_FLAGS}" > : + LINK_FLAGS "${TARGET_BIN_FLAGS}" > : + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" > : +) > : +target_include_directories(luajit_shared PRIVATE > : + ${CMAKE_CURRENT_BINARY_DIR} > : +) > : +target_link_libraries(luajit_shared libluajit_shared ${TARGET_LIBS}) > : + > : +if(NOT BUILDMODE STREQUAL "dynamic") > : + set(LIBLUAJIT_STATIC_DEPS libluajit_static) > : +endif() > : +if(NOT BUILDMODE STREQUAL "static") > : + set(LIBLUAJIT_SHARED_DEPS libluajit_shared) > : +endif() > : +set(LIBLUAJIT_DEPS ${LIBLUAJIT_STATIC_DEPS} ${LIBLUAJIT_SHARED_DEPS}) > : + > : +if(BUILDMODE STREQUAL "dynamic") > : + set(LUAJIT_DEPS luajit_shared) > : +else() > : + set(LUAJIT_DEPS luajit_static) > : +endif() > : + > : +add_custom_target(libluajit DEPENDS ${LIBLUAJIT_DEPS}) > : +add_custom_target(luajit ALL DEPENDS libluajit ${LUAJIT_DEPS}) > : + > : +install(TARGETS ${LUAJIT_DEPS} > : + RUNTIME > : + DESTINATION bin > : + COMPONENT luajit > : +) > > Here we have reasonable cmake complain: > > -- Configuring done > WARNING: Target "luajit_static" has EXCLUDE_FROM_ALL set and will not be built by default but > an install rule has been provided for it. CMake does not define behavior for this case. > WARNING: Target "libluajit_static" has EXCLUDE_FROM_ALL set and will not be built by default > but an install rule has been provided for it. CMake does not define behavior for this case. > Well, I have no warning at all on my machine... | $ cmake . | -- The C compiler identification is GNU 8.3.0 | -- Check for working C compiler: /usr/bin/cc | -- Check for working C compiler: /usr/bin/cc -- works | -- Detecting C compiler ABI info | -- Detecting C compiler ABI info - done | -- Detecting C compile features | -- Detecting C compile features - done | -- [SetVersion] Reading version from VCS: v2.1.0-beta3-79-ge616d62 | -- The ASM compiler identification is GNU | -- Found assembler: /usr/bin/cc | -- Configuring done | -- Generating done | -- Build files have been written to: /tarantool-luajit > There is no much point to install ${LIBLUAJIT_STATIC_DEPS} or ${LIBLUAJIT_SHARED_DEPS} if we have > excluded luajit_static and/or libluajit_shared from target all dependencies via EXCLUDE_FROM_ALL. ... however, I looked to the docs[2] and there is mentioned the fact such behaviour is not defined and user is responsible to ensure whether the corresponding artefacts are built prior to installing them. I believed this machinery can be done on CMake side, but I forgot that CMake is a crap. Wrapped all install rules with if/endif, squashed, force-pushed to the branch. Diff is below: ================================================================================ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5724c8b..51e97a6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -338,21 +338,35 @@ set(LUAJIT_BINARY $ PARENT_SCOPE) add_custom_target(libluajit DEPENDS ${LIBLUAJIT_DEPS}) add_custom_target(luajit ALL DEPENDS libluajit ${LUAJIT_DEPS}) -install(TARGETS ${LUAJIT_DEPS} - RUNTIME - DESTINATION bin - COMPONENT luajit -) -install(TARGETS ${LIBLUAJIT_STATIC_DEPS} - ARCHIVE - DESTINATION lib - COMPONENT luajit -) -install(TARGETS ${LIBLUAJIT_SHARED_DEPS} - LIBRARY - DESTINATION lib - COMPONENT luajit -) +# Unfortunately, CMake provides no guarantees for install commands +# used for the targets excluded from and obligues user to +# handle this manually on his side. Hence check whether the +# targets used below are presented for the chosen build mode. +# See more info in CMake docs below: +# https://cmake.org/cmake/help/v3.1/prop_tgt/EXCLUDE_FROM_ALL.html +if(TARGET ${LUAJIT_DEPS}) + install(TARGETS ${LUAJIT_DEPS} + RUNTIME + DESTINATION bin + COMPONENT luajit + ) +endif() + +if(TARGET ${LIBLUAJIT_STATIC_DEPS}) + install(TARGETS ${LIBLUAJIT_STATIC_DEPS} + ARCHIVE + DESTINATION lib + COMPONENT luajit + ) +endif() + +if(TARGET ${LIBLUAJIT_SHARED_DEPS}) + install(TARGETS ${LIBLUAJIT_SHARED_DEPS} + LIBRARY + DESTINATION lib + COMPONENT luajit + ) +endif() install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lua.h # C API for Lua ================================================================================ > > : +install(TARGETS ${LIBLUAJIT_STATIC_DEPS} > : + ARCHIVE > : + DESTINATION lib > : + COMPONENT luajit > : +) > : +install(TARGETS ${LIBLUAJIT_SHARED_DEPS} > : + LIBRARY > : + DESTINATION lib > : + COMPONENT luajit > : +) > : + > : diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt > : new file mode 100644 > : index 0000000..f9ffc5e > : --- /dev/null > : +++ b/tools/CMakeLists.txt > : @@ -0,0 +1,77 @@ > : +# Building tools for developing with uJIT. > : +# Major portions taken verbatim or adapted from the uJIT. > : +# Copyright (C) 2015-2019 IPONWEB Ltd. > > 2019 IPONWEB? Ditto. Fixed, squashed, force-pushed to the branch. Diff is below: ================================================================================ diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index af3de33..60535cd 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -1,6 +1,7 @@ # Building tools for developing with uJIT. # Major portions taken verbatim or adapted from the uJIT. -# Copyright (C) 2015-2019 IPONWEB Ltd. +# Copyright (C) 2020-2021 LuaVela Authors. +# Copyright (C) 2015-2020 IPONWEB Ltd. # See the rationale in the root CMakeLists.txt. cmake_minimum_required(VERSION 3.1 FATAL_ERROR) ================================================================================ > > : + > : +# See the rationale in the root CMakeLists.txt > : +cmake_minimum_required(VERSION 3.1 FATAL_ERROR) > : + > : +set(LUAJIT_TOOLS_DEPS) > : + > : +if(LUAJIT_DISABLE_MEMPROF) > : + message(STATUS "LuaJIT memory profiler support is disabled") > : +else() > : + # XXX: Can use genex here since the value need to be evaluated > : + # on the configuration phase. Fortunately, we know the exact > : + # path where LuaJIT binary is located. > : + set(LUAJIT_TOOLS_BIN ${LUAJIT_BINARY_DIR}/${LUAJIT_CLI_NAME}) > : + set(LUAJIT_TOOLS_DIR ${CMAKE_CURRENT_SOURCE_DIR}) > : + configure_file(luajit-parse-memprof.in luajit-parse-memprof @ONLY > : ESCAPE_QUOTES) > : + > : + add_custom_target(tools-parse-memprof EXCLUDE_FROM_ALL DEPENDS > : + luajit-parse-memprof > : + memprof/humanize.lua > : + memprof/parse.lua > : + memprof.lua > : + utils/bufread.lua > : + utils/symtab.lua > : + ) > : + list(APPEND LUAJIT_TOOLS_DEPS tools-parse-memprof) > : + > : + install(FILES > : + ${CMAKE_CURRENT_SOURCE_DIR}/memprof/humanize.lua > : + ${CMAKE_CURRENT_SOURCE_DIR}/memprof/parse.lua > : + DESTINATION ${LUAJIT_DATAROOTDIR}/memprof > : + PERMISSIONS > : + OWNER_READ OWNER_WRITE > : + GROUP_READ > : + WORLD_READ > : + COMPONENT tools-parse-memprof > : + ) > : + install(FILES > : + ${CMAKE_CURRENT_SOURCE_DIR}/utils/bufread.lua > : + ${CMAKE_CURRENT_SOURCE_DIR}/utils/symtab.lua > : + DESTINATION ${LUAJIT_DATAROOTDIR}/utils > : + PERMISSIONS > : + OWNER_READ OWNER_WRITE > : + GROUP_READ > : + WORLD_READ > : + COMPONENT tools-parse-memprof > : + ) > : + install(FILES > : + ${CMAKE_CURRENT_SOURCE_DIR}/memprof.lua > : + DESTINATION ${LUAJIT_DATAROOTDIR} > : + PERMISSIONS > : + OWNER_READ OWNER_WRITE > : + GROUP_READ > : + WORLD_READ > : + COMPONENT tools-parse-memprof > : + ) > : + install(CODE > : + # XXX: Since the auxiliary script need to be configured in > : + # other way it need to be reconfigured it prior to its > : + # installation. Unfortunately, we need to manually specify > : + # the installation path in command. > : + # Hope this script will be gone as a result of the issue below > : + # https://github.com/tarantool/tarantool/issues/5688. > : + " > : + set(LUAJIT_TOOLS_BIN ${CMAKE_INSTALL_PREFIX}/bin/${LUAJIT_CLI_NAME}) > : + set(LUAJIT_TOOLS_DIR ${CMAKE_INSTALL_PREFIX}/${LUAJIT_DATAROOTDIR}) > : + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/luajit-parse-memprof.in > : + ${CMAKE_INSTALL_PREFIX}/bin/luajit-parse-memprof @ONLY > : ESCAPE_QUOTES) > : + message(STATUS \"Installing: ${CMAKE_INSTALL_PREFIX}/bin/luajit- > : parse-memprof\") > : + " > : + COMPONENT tools-parse-memprof > : + ) > > Шайтан! Спасибо, я старался сделать этот кусок таким образом, чтобы он мотивировать в срочном порядке сделать 5688. Waytan it is! \m/ > > : +endif() > : + > : +add_custom_target(LuaJIT-tools DEPENDS ${LUAJIT_TOOLS_DEPS}) > : -- > : 2.25.0 > > Regards, > Timur > I also fixed all other occurences related to "2019, IPONWEB?" comments. Fixed, squashed, force-pushed to the branch. Diff is below: ================================================================================ diff --git a/cmake/MakeSourceList.cmake b/cmake/MakeSourceList.cmake index fa455bb..393777c 100644 --- a/cmake/MakeSourceList.cmake +++ b/cmake/MakeSourceList.cmake @@ -1,5 +1,6 @@ # Major portions taken verbatim or adapted from the uJIT. -# Copyright (C) 2015-2019 IPONWEB Ltd. +# Copyright (C) 2020-2021 LuaVela Authors. +# Copyright (C) 2015-2020 IPONWEB Ltd. # # make_source_list provides a convenient way to define a list of sources # and get a list of absolute paths. diff --git a/cmake/SetVersion.cmake b/cmake/SetVersion.cmake index 3f0247c..ed5815d 100644 --- a/cmake/SetVersion.cmake +++ b/cmake/SetVersion.cmake @@ -1,6 +1,7 @@ # Find, check and set LuaJIT's version from a VCS tag. # Major portions taken verbatim or adapted from the uJIT. -# Copyright (C) 2015-2019 IPONWEB Ltd. +# Copyright (C) 2020-2021 LuaVela Authors. +# Copyright (C) 2015-2020 IPONWEB Ltd. function(SetVersion version majver minver patchver tweakver prerel) find_package(Git QUIET REQUIRED) ================================================================================ [1]: https://github.com/luavela/luavela/pull/36 [2]: https://cmake.org/cmake/help/v3.1/prop_tgt/EXCLUDE_FROM_ALL.html -- Best regards, IM