Support the analyzer on all targets.
Move the analyzer setup to process_toolchain() in configure to
ensure the {CXX,LD}FLAGS are picked up for all targets.
Change-Id: I037f52406c19a42ddd848adad2f43d3a49b00ded
diff --git a/build/make/configure.sh b/build/make/configure.sh
index 71666f5..4ece17a 100644
--- a/build/make/configure.sh
+++ b/build/make/configure.sh
@@ -1148,10 +1148,6 @@
enabled pic && add_asflags --apcs=/fpic
enabled shared && add_cflags --shared
fi
- if enabled analyzer; then
- add_cxxflags ${WX_CXXFLAGS}
- add_extralibs ${WX_LDFLAGS}
- fi
;;
esac
;;
diff --git a/configure b/configure
index 238b3a0..71a46f4 100755
--- a/configure
+++ b/configure
@@ -648,14 +648,6 @@
check_header unistd.h # for sysconf(3) and friends.
check_header aom/aom_integer.h -I${source_path} && enable_feature aom_ports
- enabled analyzer && soft_enable wxwidgets
- if enabled wxwidgets; then
- if ! wx-config --version > /dev/null; then
- die "Couldn't find wx-config"
- fi
- WX_CXXFLAGS=$(wx-config --cppflags)
- WX_LDFLAGS=$(wx-config --libs)
- fi
}
process_toolchain() {
@@ -699,6 +691,16 @@
add_cflags -fp-model precise
fi
+ if enabled analyzer; then
+ soft_enable wxwidgets
+ if ! wx-config --version > /dev/null; then
+ die "Couldn't find wx-config"
+ fi
+
+ add_cxxflags_only $(wx-config --cppflags)
+ add_extralibs $(wx-config --libs)
+ fi
+
# Enable extra, harmless warnings. These might provide additional insight
# to what the compiler is doing and why, but in general, but they shouldn't
# be treated as fatal, even if we're treating warnings as errors.
diff --git a/examples.mk b/examples.mk
index 68f6a0f..dfc13f4 100644
--- a/examples.mk
+++ b/examples.mk
@@ -62,13 +62,6 @@
INC_PATH-yes += $(SRC_PATH_BARE)/third_party/libwebm
endif
-# TODO(tomfinegan): Figure out why add_{c,cpp}flags/add_extralibs doesn't work
-# for CXX examples.
-ifeq ($(CONFIG_ANALYZER),yes)
- CXXFLAGS += ${WX_CXXFLAGS}
- extralibs += ${WX_LDFLAGS}
-endif
-
# List of examples to build. UTILS are tools meant for distribution
# while EXAMPLES demonstrate specific portions of the API.
UTILS-$(CONFIG_DECODERS) += aomdec.c