Merge branch 'dbkr/emscripten_is_picky_about_pic' into 'master'
Build the js objects without PIC See merge request matrix-org/olm!8
This commit is contained in:
commit
3568060570
1 changed files with 9 additions and 6 deletions
15
Makefile
15
Makefile
|
@ -81,10 +81,13 @@ CPPFLAGS += -Iinclude -Ilib \
|
||||||
-DOLMLIB_VERSION_PATCH=$(PATCH)
|
-DOLMLIB_VERSION_PATCH=$(PATCH)
|
||||||
|
|
||||||
# we rely on <stdint.h>, which was introduced in C99
|
# we rely on <stdint.h>, which was introduced in C99
|
||||||
CFLAGS += -Wall -Werror -std=c99 -fPIC
|
CFLAGS += -Wall -Werror -std=c99
|
||||||
CXXFLAGS += -Wall -Werror -std=c++11 -fPIC
|
CXXFLAGS += -Wall -Werror -std=c++11
|
||||||
LDFLAGS += -Wall -Werror
|
LDFLAGS += -Wall -Werror
|
||||||
|
|
||||||
|
CFLAGS_NATIVE = -fPIC
|
||||||
|
CXXFLAGS_NATIVE = -fPIC
|
||||||
|
|
||||||
EMCCFLAGS = --closure 1 --memory-init-file 0 -s NO_FILESYSTEM=1 -s INVOKE_RUN=0 -s MODULARIZE=1
|
EMCCFLAGS = --closure 1 --memory-init-file 0 -s NO_FILESYSTEM=1 -s INVOKE_RUN=0 -s MODULARIZE=1
|
||||||
|
|
||||||
# Olm generally doesn't need a lot of memory to encrypt / decrypt its usual
|
# Olm generally doesn't need a lot of memory to encrypt / decrypt its usual
|
||||||
|
@ -113,12 +116,12 @@ CPPFLAGS += -MMD
|
||||||
|
|
||||||
### per-target variables
|
### per-target variables
|
||||||
|
|
||||||
$(RELEASE_OBJECTS): CFLAGS += $(RELEASE_OPTIMIZE_FLAGS)
|
$(RELEASE_OBJECTS): CFLAGS += $(RELEASE_OPTIMIZE_FLAGS) $(CFLAGS_NATIVE)
|
||||||
$(RELEASE_OBJECTS): CXXFLAGS += $(RELEASE_OPTIMIZE_FLAGS)
|
$(RELEASE_OBJECTS): CXXFLAGS += $(RELEASE_OPTIMIZE_FLAGS) $(CXXFLAGS_NATIVE)
|
||||||
$(RELEASE_TARGET): LDFLAGS += $(RELEASE_OPTIMIZE_FLAGS)
|
$(RELEASE_TARGET): LDFLAGS += $(RELEASE_OPTIMIZE_FLAGS)
|
||||||
|
|
||||||
$(DEBUG_OBJECTS): CFLAGS += $(DEBUG_OPTIMIZE_FLAGS)
|
$(DEBUG_OBJECTS): CFLAGS += $(DEBUG_OPTIMIZE_FLAGS) $(CFLAGS_NATIVE)
|
||||||
$(DEBUG_OBJECTS): CXXFLAGS += $(DEBUG_OPTIMIZE_FLAGS)
|
$(DEBUG_OBJECTS): CXXFLAGS += $(DEBUG_OPTIMIZE_FLAGS) $(CXXFLAGS_NATIVE)
|
||||||
$(DEBUG_TARGET): LDFLAGS += $(DEBUG_OPTIMIZE_FLAGS)
|
$(DEBUG_TARGET): LDFLAGS += $(DEBUG_OPTIMIZE_FLAGS)
|
||||||
|
|
||||||
$(TEST_BINARIES): CPPFLAGS += -Itests/include
|
$(TEST_BINARIES): CPPFLAGS += -Itests/include
|
||||||
|
|
Loading…
Reference in a new issue