Skip to content

Commit 38ea2b1

Browse files
committed
disable warning about unused flags msse and msse on Apple Silicon
1 parent 4145e17 commit 38ea2b1

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

src/configure

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,6 +1150,8 @@ elif [ "`uname`" == "Darwin" ]; then
11501150
cat makefiles/darwin_clapack.mk >> kaldi.mk
11511151
echo "Warning (CLAPACK): this part of the configure process is not properly tested and may not work."
11521152
echo "Successfully configured for Darwin with CLAPACK libs from $CLAPACKROOT"
1153+
elif [ "`uname -m`" == "arm64" ]; then
1154+
cat makefiles/darwin_arm64.mk >> kaldi.mk
11531155
else
11541156
cat makefiles/darwin.mk >> kaldi.mk
11551157
fi

src/makefiles/darwin_arm64.mk

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Darwin (macOS) configuration
2+
3+
ifndef DOUBLE_PRECISION
4+
$(error DOUBLE_PRECISION not defined.)
5+
endif
6+
ifndef OPENFSTINC
7+
$(error OPENFSTINC not defined.)
8+
endif
9+
ifndef OPENFSTLIBS
10+
$(error OPENFSTLIBS not defined.)
11+
endif
12+
13+
CXXFLAGS = -std=c++14 -I.. -I$(OPENFSTINC) -O1 $(EXTRA_CXXFLAGS) \
14+
-Wall -Wno-sign-compare -Wno-unused-local-typedefs \
15+
-Wno-deprecated-declarations -Winit-self \
16+
-DKALDI_DOUBLEPRECISION=$(DOUBLE_PRECISION) \
17+
-DHAVE_EXECINFO_H=1 -DHAVE_CXXABI_H -DHAVE_CLAPACK \
18+
-pthread \
19+
-g # -O0 -DKALDI_PARANOID
20+
21+
ifeq ($(KALDI_FLAVOR), dynamic)
22+
CXXFLAGS += -fPIC
23+
endif
24+
25+
# Compiler specific flags
26+
COMPILER = $(shell $(CXX) -v 2>&1)
27+
ifeq ($(findstring clang,$(COMPILER)),clang)
28+
# Suppress annoying clang warnings that are perfectly valid per spec.
29+
CXXFLAGS += -Wno-mismatched-tags
30+
else ifeq ($(findstring GCC,$(COMPILER)),GCC)
31+
# Allow implicit conversions between vectors.
32+
CXXFLAGS += -flax-vector-conversions
33+
endif
34+
35+
LDFLAGS = $(EXTRA_LDFLAGS) $(OPENFSTLDFLAGS) -g
36+
LDLIBS = $(EXTRA_LDLIBS) $(OPENFSTLIBS) -framework Accelerate -lm -lpthread -ldl

0 commit comments

Comments
 (0)