[Tarantool-patches] [PATCH] cmake: add LTO support for building luajit

Igor Munkin imun at tarantool.org
Tue May 26 13:11:08 MSK 2020


Olya,

Thanks, the patch is nice! I also checked it manually on my Gentoo host
the way Sergey and you proposed:
| $ cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_LTO=ON . &> cmake.out
| $ grep -F 'LTO' cmake.out
| -- Enabling LTO: TRUE
| Setting LTO flags for building luajit
| $ make VERBOSE=1 &> make.out
| $ grep -F 'lj_vm.o' make.out
| ASM       lj_vm.o
| /usr/bin/cc -O0 -Wall -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DNVALGRIND=1
| -DLUA_USE_APICHECK=1 -DLUA_USE_ASSERT=1 -DLUAJIT_ENABLE_PAIRSMM=1
| -DLUAJIT_SMART_STRINGS=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
| -U_FORTIFY_SOURCE -fno-stack-protector  -fexceptions -funwind-tables
| -fno-omit-frame-pointer -fno-stack-protector -fno-common -fopenmp -msse2
| -Wno-parentheses-equality -Wno-tautological-compare
| -Wno-misleading-indentation -Wno-varargs -Wno-implicit-fallthrough -flto
| -fuse-linker-plugin -fno-fat-lto-objects -c -o lj_vm.o lj_vm.S
| gcc-ar rcus libluajit.a lj_vm.o lj_gc.o lj_err.o lj_char.o lj_bc.o
| lj_obj.o lj_buf.o lj_str.o lj_tab.o lj_func.o lj_udata.o lj_meta.o
| lj_debug.o lj_state.o lj_dispatch.o lj_vmevent.o lj_vmmath.o lj_strscan.o
| lj_strfmt.o lj_strfmt_num.o lj_api.o lj_profile.o lj_lex.o lj_parse.o
| lj_bcread.o lj_bcwrite.o lj_load.o lj_ir.o lj_opt_mem.o lj_opt_fold.o
| lj_opt_narrow.o lj_opt_dce.o lj_opt_loop.o lj_opt_split.o lj_opt_sink.o
| lj_mcode.o lj_snap.o lj_record.o lj_crecord.o lj_ffrecord.o lj_asm.o
| lj_trace.o lj_gdbjit.o lj_ctype.o lj_cdata.o lj_cconv.o lj_ccall.o
| lj_ccallback.o lj_carith.o lj_clib.o lj_cparse.o lj_lib.o lj_alloc.o
| lib_aux.o lib_base.o lib_math.o lib_bit.o lib_string.o lib_table.o
| lib_io.o lib_os.o lib_package.o lib_debug.o lib_jit.o lib_ffi.o lib_init.o

I see all requested build options are set. However, I see build failures
on OSX[1] not directly related to the changes. So I propose to rebase
your patch on the current master and re-run full CI pipeline to make
sure there are no build failures related to your patch (but I don't
expect any).

Please also provide a ChangeLog entry.

Otherwise, the changes LGTM, thanks!

Sasha, please proceed with the patch.

<snipped>

[1]: https://gitlab.com/tarantool/tarantool/-/jobs/567445297

-- 
Best regards,
IM


More information about the Tarantool-patches mailing list