Merge "Build SF executable with USE_HWC2 when needed" into nyc-mr1-dev
diff --git a/services/surfaceflinger/Android.mk b/services/surfaceflinger/Android.mk
index 2a8fa4a..dc5e97b 100644
--- a/services/surfaceflinger/Android.mk
+++ b/services/surfaceflinger/Android.mk
@@ -146,6 +146,10 @@
     LOCAL_CFLAGS += -DENABLE_CPUSETS
 endif
 
+ifeq ($(TARGET_USES_HWC2),true)
+    LOCAL_CFLAGS += -DUSE_HWC2
+endif
+
 LOCAL_SRC_FILES := \
     main_surfaceflinger.cpp