Optimize for aarch64 big-endian
This commit is contained in:
parent
1b7cc6444d
commit
a450805eeb
7
Makefile
7
Makefile
|
@ -81,7 +81,7 @@ $(SNAPPY_GIT_UNPACKED):
|
|||
|
||||
$(SNAPPY_CMAKE_CACHE): $(SNAPPY_GIT_UNPACKED)
|
||||
@mkdir -p $(SNAPPY_OUT)
|
||||
cd $(SNAPPY_OUT) && cmake $(SNAPPY_CMAKE_OPTS) -DCMAKE_CXX_COMPILER=$(CXX) ../../$(SNAPPY_SRC_DIR)
|
||||
cd $(SNAPPY_OUT) && cmake $(SNAPPY_CMAKE_OPTS) ../../$(SNAPPY_SRC_DIR)
|
||||
touch $@
|
||||
|
||||
jni-header: $(SNAPPY_GIT_UNPACKED) $(BITSHUFFLE_UNPACKED) $(SRC)/org/xerial/snappy/SnappyNative.h $(SRC)/org/xerial/snappy/BitShuffleNative.h
|
||||
|
@ -109,6 +109,11 @@ ifeq ($(OS_NAME),Windows)
|
|||
SNAPPY_CXX_OPTS:=-include$(SNAPPY_OUT)/snappy-stubs-public.h
|
||||
endif
|
||||
|
||||
# aarch64 can use big-endian optimzied code
|
||||
ifeq ($(OS_ARCH),aarch64)
|
||||
SNAPPY_CXX_OPTS:=-DSNAPPY_IS_BIG_ENDIAN
|
||||
endif
|
||||
|
||||
$(SNAPPY_OUT)/%.o: $(SNAPPY_SRC_DIR)/%.cc
|
||||
@mkdir -p $(@D)
|
||||
$(CXX) $(SNAPPY_CXX_OPTS) $(CXXFLAGS) -c $< -o $@
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue