[vlc-devel] [PATCH] contrib: harfbuzz: Pass -mbig-obj to the assembler

Martin Storsjö martin at martin.st
Mon Mar 30 20:34:50 CEST 2020


On Mon, 30 Mar 2020, Hugo Beauzée-Luyssen wrote:

> On Mon, Mar 30, 2020, at 4:11 PM, Steve Lhomme wrote:
>> On 2020-03-30 15:35, Hugo Beauzée-Luyssen wrote:
>> > Which fixes non-optimized win64 builds
>> > ---
>> >   contrib/src/harfbuzz/rules.mak | 8 +++++++-
>> >   1 file changed, 7 insertions(+), 1 deletion(-)
>> > 
>> > diff --git a/contrib/src/harfbuzz/rules.mak b/contrib/src/harfbuzz/rules.mak
>> > index 374a4ff1da..aecbbe9214 100644
>> > --- a/contrib/src/harfbuzz/rules.mak
>> > +++ b/contrib/src/harfbuzz/rules.mak
>> > @@ -25,8 +25,14 @@ harfbuzz: harfbuzz-$(HARFBUZZ_VERSION).tar.xz .sum-harfbuzz
>> > 
>> >   DEPS_harfbuzz = freetype2 $(DEPS_freetype2)
>> > 
>> > +HARFBUZZ_CXXFLAGS := $(CXXFLAGS)
>> > +ifdef HAVE_WIN64
>> > +HARFBUZZ_CXXFLAGS := -Wa,-mbig-obj $(HARFBUZZ_CXXFLAGS)
>> 
>> Is this understood by all compilers/toolchains ? If not it may be better 
>> to add the flag via CMake which will check it's supported.
>> 
>
> My understanding is that it is added by default (and therefor 
> understood) by llvm, and it's definitely not handled by msvc.

LLVM doesn't add the -mbig-obj flag anywhere (it uses its own 
built-in assembler anyway), but LLVM switches to the big coff object 
format when necessary (iirc).

In any case, it seems like clang accepts this flag without extra warnings 
(at least in a default configuration), so it should be fine.

// Martin


More information about the vlc-devel mailing list