qcacld-3.0: Disable PANIC_ON_BUG for end user builds

PANIC_ON_BUG is currently enabled for all WLAN builds. While a customer
can, and should, disable PANIC_ON_BUG for end user builds, this can be
easily overlooked. Disable PANIC_ON_BUG by default on pure performance
builds, to avoid accidentally crashing end user devices. Customers can
opt-in to PANIC_ON_BUG as needed for validation on performance builds.

Change-Id: I79371206b20b978f4e61954c2f49bbb7b07ba95e
CRs-Fixed: 2186099
diff --git a/Kbuild b/Kbuild
index aed385d..8f68421 100644
--- a/Kbuild
+++ b/Kbuild
@@ -268,7 +268,13 @@
 BUILD_DIAG_VERSION := 1
 
 #Do we panic on bug?  default is to warn
-PANIC_ON_BUG := 1
+ifeq ($(CONFIG_SLUB_DEBUG), y)
+	PANIC_ON_BUG := 1
+else ifeq ($(CONFIG_PERF_DEBUG), y)
+	PANIC_ON_BUG := 1
+else
+	PANIC_ON_BUG := 0
+endif
 
 #Enable OL debug and wmi unified functions
 CONFIG_ATH_PERF_PWR_OFFLOAD := 1