diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2017-09-05 14:36:14 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2017-09-08 17:06:04 +0200 |
commit | 9a7d8509efe4ac509b082cbffa24e52a7697926c (patch) | |
tree | ee097782344880b41f23c0a1571fc28ae6e4e0ce /assembler | |
parent | c3863e1998a5d46492b4ec91dd411e2d561e1472 (diff) |
meson: basic build system support
Why?
Because it's fast.
Like really, really fast.
Some data (from a snb laptop, so rather lower-powered):
- Incremental build after $ touch lib/igt_core.c with meson: 0.6s
It notices that the symbol list of the libigt.so hasn't changed and
doesn't bother re-linking the almost 300 binaries we have. make -j 6
for the same scenario takes 44s.
- Incremental build with nothing changed: make: 0.7s, meson: 0.2s This
means stuff like --disable-git-hash is entirely pointless with
meson, it's faster than a make ever can be (with 0.6s).
- Reconfigure stage: ninja reconfigure 0.8s vs. ./configure 8.6s)
- Running tests, after a full build: ninja test 6s vs. make check 24s
- Full build (i.e. including ./autogen.sh respectively meson build),
including tests, from a pristine git checkout. automake 2m49s vs.
meson 44s.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Eric Anholt <eric@anholt.net>
Cc: Daniel Stone <daniel@fooishbar.org>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Acked-by: Petri Latvala <petri.latvala@intel.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'assembler')
-rw-r--r-- | assembler/meson.build | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/assembler/meson.build b/assembler/meson.build new file mode 100644 index 000000000..bdddd0e2d --- /dev/null +++ b/assembler/meson.build @@ -0,0 +1,73 @@ +lib_brw_src = [ + 'brw_context.c', + 'brw_disasm.c', + 'brw_eu.c', + 'brw_eu_compact.c', + 'brw_eu_debug.c', + 'brw_eu_emit.c', + 'brw_eu_util.c', + 'gen8_disasm.c', + 'gen8_instruction.c', + 'ralloc.c', +] + +lib_brw = shared_library('brw', lib_brw_src, + dependencies : igt_deps) + +flex = find_program('flex') +bison = find_program('bison') + +lgen = generator(flex, + output : '@BASENAME@.c', + arguments : ['-o', '@OUTPUT@', '@INPUT@']) + +lfiles = lgen.process('lex.l') + +pgen = generator(bison, + output : ['@BASENAME@.c', '@BASENAME@.h'], + arguments : ['@INPUT@', '--defines=@OUTPUT1@', '--output=@OUTPUT0@']) + +pfiles = pgen.process('gram.y') + +executable('intel-gen4asm', 'main.c', lfiles, pfiles, link_with : lib_brw) + +executable('intel-gen4disasm', 'disasm-main.c', link_with : lib_brw) + +gen4asm_testcases = [ + 'test/mov', + 'test/frc', + 'test/rndd', + 'test/rndu', + 'test/rnde', + 'test/rnde-intsrc', + 'test/rndz', + 'test/lzd', + 'test/not', + 'test/immediate', +] + +# Those tests were already failing when the assembler was imported from +# the intel-gen4asm git repository: +# http://cgit.freedesktop.org/xorg/app/intel-gen4asm/ +# We disable them "for now" as a workaround to be able to release i-g-t +gen4asm_testcases_broken = [ + 'test/declare', + 'test/jmpi', + 'test/if', + 'test/iff', + 'test/while', + 'test/else', + 'test/break', + 'test/cont', + 'test/halt', + 'test/wait', + 'test/endif', +] + +test_runner = find_program('test/run-test.sh') +foreach testcase : gen4asm_testcases + test('assembler: ' + testcase, test_runner, + args : testcase, + env : [ 'srcdir=' + meson.current_source_dir(), + 'top_builddir=' + meson.current_build_dir()]) +endforeach |