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 1CC4E6EC58; Sat, 20 Feb 2021 10:42:17 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 1CC4E6EC58 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1613806937; bh=/CizlGwry4sfMHIJOI1S5KnoBHRYHF4yLlSTaL7jTvA=; h=To:Cc:References:In-Reply-To:Date:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=kIu/1sGlXhz0AXfvRyEopaCrkk9KLhRAX6/Lahig+YWQqiBhgcDnaWp890OP5GIps dllGkAmgVCAIhWS2AapSh+9ysuo+5DSSYdLuY0LYYBeNLd+MVqUuedSxXciLd/MaWv cwc3eD3yIoIC3YLbVUhY0ZV6776cdRY8MlI+Zbls= Received: from smtp43.i.mail.ru (smtp43.i.mail.ru [94.100.177.103]) (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 979C76EC58 for ; Sat, 20 Feb 2021 10:42:16 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 979C76EC58 Received: by smtp43.i.mail.ru with esmtpa (envelope-from ) id 1lDMu7-0005Sn-Hu; Sat, 20 Feb 2021 10:42:16 +0300 To: "'Igor Munkin'" , "'Sergey Kaplun'" Cc: References: <9426dbd66c51aa466ab89272894ad33a7b22edec.1612390822.git.imun@tarantool.org> <20210215161354.GI9361@root> <20210219231009.GS5448@tarantool.org> In-Reply-To: <20210219231009.GS5448@tarantool.org> Date: Sat, 20 Feb 2021 10:42:10 +0300 Message-ID: <0b6401d7075b$e61456f0$b23d04d0$@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQKSGo9nMqUfEa7rxZOpsUP/wg+emgB6pWKvAZBBG8AChWmruKjF/lvA Content-Language: ru X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD975C3EC174F56692243410BA6471F0166336C1783AA96243D182A05F53808504002A8DF4E250C4B4C3A4AC2B5878B3BD88D7FB7D1F60AB72E52AC563820A3B247 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7EA4B66823129EB3CEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637F898CA578D17CA188638F802B75D45FF5571747095F342E8C7A0BC55FA0FE5FC0EA3E16AAC0578F92550C499601CADAD928C24C17CA7A7B5389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C07E7E81EEA8A9722B8941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B6D082881546D93491CC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB8D32BA5DBAC0009BE9E8FC8737B5C224986EBEE430A40EBA476E601842F6C81A12EF20D2F80756B5F7E9C4E3C761E06A776E601842F6C81A127C277FBC8AE2E8B2550735BCEEF65B73AA81AA40904B5D9DBF02ECDB25306B2B25CBF701D1BE8734AD6D5ED66289B5278DA827A17800CE75A9E79F66F1C28F367F23339F89546C5A8DF7F3B2552694A6FED454B719173D6725E5C173C3A84C30584FF81F342DA0735872C767BF85DA2F004C906525384306FED454B719173D6462275124DF8B9C9DF33B08B2BB81206574AF45C6390F7469DAA53EE0834AAEE X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A24A6D60772A99906F8E1CD14B953EB46DFB02DD1E4E9A36CD355D89D7DBCDD132 X-C1DE0DAB: 0D63561A33F958A505318D4BF3EC7370F15D7024217A06CBD40075DF3058DFE9D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75448CF9D3A7B2C848410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3416EA6E382A5BB176599C33B9A14DF1B59B9942CF0D77BDC7E254D5D73B82B460F8133855FF9E44091D7E09C32AA3244C5AF822AEBA9D5D66809181F6C98C2CF18A6D4CC6FBFAC251FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj2CfMKaWP9xvOiL+Erv1ovA== X-Mailru-Sender: 6CA451E36783D721CBEA96CEA26D325D1F67203B5B11628169B7107E67542E84B7CBEF92542CD7C82F97C478340294DCC77752E0C033A69E0F0C7111264B8915FF1320A92A5534336C18EFA0BB12DBB0 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH 2/3] build: adjust LuaJIT build system 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: Timur Safin via Tarantool-patches Reply-To: Timur Safin Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" : From: Igor Munkin : Subject: Re: [PATCH 2/3] build: adjust LuaJIT build system : : Sergey, : : Thanks for your review! : ... : : > > +macro(TestAndAppendFLag flags flag) : > : > Nit: Why macro not function? It is visible to all project after : > including. : > Feel free to ignore. : : variable need to be expanded twice: the first time to : interpolate the variable name and the second time to interpolate that : variable value. Unfortunately, there is no way to implement it in a : different way via CMake. Yup, with function instead of macro it would be very verbose and Unreadable. Macro is the simplest and cleanest way here for their purpose. : : Ignoring. : : > : > > + string(REGEX REPLACE "-" "_" TESTFLAG ${flag}) : > > + string(TOUPPER ${TESTFLAG} TESTFLAG) : > > + # XXX: can't use string(PREPEND ...) on ancient versions. : > > + set(TESTFLAG "CC_HAS${TESTFLAG}") : > > + if(${${TESTFLAG}}) : > > + set(${flags} "${${flags}} ${flag}") : : Here is the problem spot. : : > > endif() : > > endmacro() : > > : : : : : > : > > + "Generate target" FORCE) : > > + : > > +# Enable internal LuaJIT assertions for Tarantool Debug build. : > > +if(CMAKE_BUILD_TYPE STREQUAL "Debug") : > : > Side note: I get tons of warnings like: : > : > | [ 47%] Building C object : third_party/luajit/src/CMakeFiles/core_static.dir/lib_string.c.o : > | [ 47%] Building C object : third_party/luajit/src/CMakeFiles/core_static.dir/lib_table.c.o : > | /home/burii/reviews/tarantool/luajit- : cmake/third_party/luajit/src/lj_strfmt.c: In function 'lj_strfmt_putfxint': : > | /home/burii/reviews/tarantool/luajit- : cmake/third_party/luajit/src/lj_strfmt.c:260:9: warning: variable 'ps' set : but not used [-Wunused-but-set-variable] : > | 260 | char *ps; : > | | ^~ : > : > If build with `-DCMAKE_BUILD_TYPE=Debug` first, **do not** run : > `rm CMakeCache.txt` and then build with : > `-DCMAKE_BUILD_TYPE=RelWithDebInfo`. I am not familiar with CMake, is it : > an expected behaviour? : : I don't know. I guess there is something cached in CMakeCache.txt that : leads to such warnings. Maybe Timur will clarify this behaviour. Yes, toolchain settings (including compiler settings and build mode) Are cached in CMakeCache.txt and not reassigned from command-line if there is cached value. You have to delete toolchain cached values to make all variables be redefined. If you not delete CMAkeCache.txt you get shorter cmake cycle, which might be not exactly what you hoped to get. : : > : : : : > > +add_dependencies(build_bundled_libs libluajit) : > : > Nit: Looks like it should be in the root , not here. : > Feel free to ignore. : : Originally, it was here, so I would like to leave it here too. The more local - the better. Agreed. : : Ignoring. : : > : Timur