mirror of https://github.com/odrling/Aegisub
Merge branch 'bugfixes' into feature
This commit is contained in:
commit
b3eb182259
|
@ -23,7 +23,6 @@
|
||||||
#include <boost/range/algorithm.hpp>
|
#include <boost/range/algorithm.hpp>
|
||||||
|
|
||||||
#include <libaegisub/charset_conv.h>
|
#include <libaegisub/charset_conv.h>
|
||||||
#include <iconv.h>
|
|
||||||
|
|
||||||
#include "charset_6937.h"
|
#include "charset_6937.h"
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <libaegisub/exception.h>
|
#include <libaegisub/exception.h>
|
||||||
|
#include <iconv.h>
|
||||||
|
|
||||||
namespace agi {
|
namespace agi {
|
||||||
namespace charset {
|
namespace charset {
|
||||||
|
@ -34,8 +35,6 @@ DEFINE_EXCEPTION(BufferTooSmall, ConversionFailure);
|
||||||
DEFINE_EXCEPTION(BadInput, ConversionFailure);
|
DEFINE_EXCEPTION(BadInput, ConversionFailure);
|
||||||
DEFINE_EXCEPTION(BadOutput, ConversionFailure);
|
DEFINE_EXCEPTION(BadOutput, ConversionFailure);
|
||||||
|
|
||||||
typedef void *iconv_t;
|
|
||||||
|
|
||||||
/// RAII handle for iconv
|
/// RAII handle for iconv
|
||||||
class Iconv {
|
class Iconv {
|
||||||
iconv_t cd;
|
iconv_t cd;
|
||||||
|
|
|
@ -10,34 +10,37 @@ endif
|
||||||
dynasm_dasc = files('../vm_@0@.dasc'.format(dynasm_arch))
|
dynasm_dasc = files('../vm_@0@.dasc'.format(dynasm_arch))
|
||||||
dasm = [minilua, files('../../dynasm/dynasm.lua')]
|
dasm = [minilua, files('../../dynasm/dynasm.lua')]
|
||||||
|
|
||||||
if cc.get_id() == 'msvc'
|
# BUG: meson does not resolve paths correctly for subprojects
|
||||||
# the cl.exe preprocessor seemingly removes/expands macros, so hardcode flags
|
hpre = '#include "@0@/../lj_arch.h"'.format(meson.current_source_dir())
|
||||||
dasm += ['-D', 'WIN', '-D', 'JIT', '-D', 'FFI']
|
|
||||||
if host_machine.cpu_family() == 'x86_64'
|
|
||||||
dasm += ['-D', 'P64']
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
# BUG: meson does not resolve paths correctly for subprojects
|
|
||||||
hpre = '#include "@0@/../lj_arch.h"'.format(meson.current_source_dir())
|
|
||||||
|
|
||||||
checkdefs = [
|
checkdefs = [
|
||||||
['LJ_LE', '1', ['-D', 'ENDIAN_LE']],
|
['LJ_LE', '1', ['-D', 'ENDIAN_LE']],
|
||||||
['LJ_ARCH_BITS', '64', ['-D', 'P64']],
|
['LJ_ARCH_BITS', '64', ['-D', 'P64']],
|
||||||
['LJ_HASJIT', '1', ['-D', 'JIT']],
|
['LJ_HASJIT', '1', ['-D', 'JIT']],
|
||||||
['LJ_HASFFI', '1', ['-D', 'FFI']],
|
['LJ_HASFFI', '1', ['-D', 'FFI']],
|
||||||
]
|
['LJ_DUALNUM', '1', ['-D', 'DUALNUM']],
|
||||||
|
['LJ_ARCH_HASFPU', '1', ['-D', 'FPU']],
|
||||||
|
['LJ_ABI_SOFTFP', '0', ['-D', 'HFABI']],
|
||||||
|
['LJ_NO_UNWIND', '1', ['-D', 'NO_UNWIND']],
|
||||||
|
['LJ_ABI_PAUTH', '1', ['-D', 'PAUTH']],
|
||||||
|
]
|
||||||
|
|
||||||
if host_machine.cpu_family() == 'x86'
|
if host_machine.cpu_family() == 'x86'
|
||||||
checkdefs += ['__SSE2__', '1', ['-D', 'SSE']]
|
checkdefs += ['__SSE2__', '1', ['-D', 'SSE']]
|
||||||
endif
|
|
||||||
|
|
||||||
foreach def: checkdefs
|
|
||||||
if cc.get_define(def[0], prefix: hpre) == def[1]
|
|
||||||
dasm += def[2]
|
|
||||||
endif
|
|
||||||
endforeach
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
foreach def: checkdefs
|
||||||
|
if cc.get_define(def[0], prefix: hpre) == def[1]
|
||||||
|
dasm += def[2]
|
||||||
|
endif
|
||||||
|
endforeach
|
||||||
|
|
||||||
|
if host_machine.system() == 'windows'
|
||||||
|
dasm += ['-D', 'WIN']
|
||||||
|
endif
|
||||||
|
|
||||||
|
dasm += ['-D', 'VER=' + cc.get_define('LJ_ARCH_VERSION', prefix: hpre)]
|
||||||
|
|
||||||
buildvm_src = files(
|
buildvm_src = files(
|
||||||
'buildvm.c',
|
'buildvm.c',
|
||||||
'buildvm_asm.c',
|
'buildvm_asm.c',
|
||||||
|
|
Loading…
Reference in New Issue