From: Alexander Turenko <alexander.turenko@tarantool.org>
To: Olga Arkhangelskaia <arkholga@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH] cmake: add LTO support for building luajit
Date: Wed, 8 Jul 2020 15:23:57 +0300 [thread overview]
Message-ID: <20200708122357.koubasrbblpul3yw@tkn_work_nb> (raw)
In-Reply-To: <20200312100549.31608-1-arkholga@tarantool.org>
LGTM.
There are several style comments: feel free to fix them or ignore. No
need to re-review with me.
WBR, Alexander Turenko.
> Branch: OKriw/gh-3743-LuaJIT-does-not-use-LTO-with-DENABLE_LTO=ON-full-ci
Pasted parts of actual patch comment it.
> diff --git a/cmake/luajit.cmake b/cmake/luajit.cmake
> index 10df633d5..555bc8371 100644
> --- a/cmake/luajit.cmake
> +++ b/cmake/luajit.cmake
> @@ -230,6 +230,16 @@ macro(luajit_build)
> # above.
> set (luajit_ld ${CMAKE_LINKER})
> set (luajit_ar ${CMAKE_AR} rcus)
> + # Enablibg LTO for luajit if DENABLE_LTO set.
Typo: Enablibg.
Nit: I would move it below `set (luajit_strip ${CMAKE_STRIP})` line and
format it as a separate block (add an empty line before it). Just for
readability.
> + if (ENABLE_LTO)
> + message(STATUS "Enable LTO for luajit")
> + set (luajit_ldflags ${luajit_ldflags} ${LDFLAGS_LTO})
> + message(STATUS "ld: " ${luajit_ldflags})
> + set (luajit_cflags ${luajit_cflags} ${CFLAGS_LTO})
> + message(STATUS "cflags: " ${luajit_cflags})
> + set (luajit_ar ${AR_LTO} rcus)
> + message(STATUS "ar: " ${luajit_ar})
> + endif()
Nit: Those variables are lists and they are printed without spaces
(I don't know exact reason):
| -- Enable LTO for luajit
| -- ld: -Wno-lto-type-mismatch-Wno-lto-type-mismatch
| -- cflags: -Wno-unknown-pragmas-fexceptions-funwind-tables-fno-omit-frame-pointer-fno-stack-protector-fno-common-msse2-Wno-parentheses-equality-Wno-tautological-compare-Wno-varargs-Wno-implicit-fallthrough-flto=thin
| -- ar: "/usr/lib/llvm-8/bin/llvm-ar"rcus
You should include them into quotes, like so:
| -message(STATUS "ld: " ${luajit_ldflags})
| +message(STATUS "ld: ${luajit_ldflags}")
(BTW, it is not ld executable, but ldflags; so I would name it 'ldflags'
in the output.)
Nit: LTO flags are already printed before:
| -- ld version string: GNU ld (GNU Binutils for Debian) 2.31.1
| -- Found ld.bfd version: 2.31
| -- CFLAGS_LTO: -flto=thin
| -- LDFLAGS_LTO: -Wno-lto-type-mismatch
| -- AR_LTO: "/usr/lib/llvm-8/bin/llvm-ar"
| -- Enabling LTO: TRUE
But I don't have strict objection against printing it again.
next prev parent reply other threads:[~2020-07-08 12:24 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-12 10:05 Olga Arkhangelskaia
2020-03-12 10:10 ` Cyrill Gorcunov
2020-04-14 9:18 ` Igor Munkin
2020-04-14 9:59 ` Olga Arkhangelskaia
2020-04-14 12:32 ` Olga Arkhangelskaia
2020-04-14 17:00 ` Igor Munkin
2020-04-15 13:22 ` Olga Arkhangelskaia
2020-04-17 11:47 ` Igor Munkin
2020-04-17 14:41 ` Olga Arkhangelskaia
2020-04-27 23:04 ` Igor Munkin
2020-05-06 10:47 ` Olga Arkhangelskaia
2020-04-14 14:33 ` Olga Arkhangelskaia
2020-05-25 12:58 ` Sergey Bronnikov
2020-05-25 15:00 ` Olga Arkhangelskaia
2020-05-25 15:12 ` Olga Arkhangelskaia
2020-05-25 15:43 ` Sergey Bronnikov
2020-05-26 10:11 ` Igor Munkin
2020-05-27 10:01 ` Olga Arkhangelskaia
2020-06-16 1:02 ` Alexander Turenko
2020-06-16 11:36 ` Olga Arkhangelskaia
2020-06-16 12:01 ` Olga Arkhangelskaia
2020-06-16 17:34 ` Alexander Turenko
2020-06-25 9:19 ` Timur Safin
2020-06-16 18:31 ` Alexander Turenko
2020-06-29 20:16 ` Olga Arkhangelskaia
2020-06-16 12:53 ` Igor Munkin
2020-06-25 9:45 ` Timur Safin
2020-06-25 9:47 ` Timur Safin
2020-07-08 12:23 ` Alexander Turenko [this message]
2020-07-08 12:34 ` Kirill Yukhin
2020-07-08 12:42 ` Kirill Yukhin
2020-07-08 12:38 ` Alexander Turenko
2020-07-09 5:13 ` Olga Arkhangelskaia
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200708122357.koubasrbblpul3yw@tkn_work_nb \
--to=alexander.turenko@tarantool.org \
--cc=arkholga@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH] cmake: add LTO support for building luajit' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox