diff --git a/build.sh b/build.sh index 5c1e6a5220..2aacd4eff2 100755 --- a/build.sh +++ b/build.sh @@ -55,7 +55,8 @@ for ARG in "$@"; do --cppcheck ) cppcheck=1 ;; --dev|--devel ) flags+=(-DCMAKE_BUILD_TYPE=Devel) build="$root/build_dev";; --dbg|--debug ) flags+=(-DCMAKE_BUILD_TYPE=Debug) build="$root/build_dbg";; - --release ) flags+=(-DCMAKE_BUILD_TYPE=Release) build="$root/build_rel";; + --rel|--release ) flags+=(-DCMAKE_BUILD_TYPE=Release) build="$root/build_rel";; + --prof ) flags+=(-DCMAKE_BUILD_TYPE=Prof) build="$root/build_prof";; --strip ) flags+=(-DCMAKE_BUILD_STRIP=TRUE) ;; --glsl ) flags+=(-DGLSL_API=TRUE) ;; --egl ) flags+=(-DEGL_API=TRUE) ;; @@ -74,6 +75,7 @@ for ARG in "$@"; do echo "** User options **" echo "--dev / --devel : Build PCSX2 as a Development build." echo "--debug : Build PCSX2 as a Debug build." + echo "--prof : Build PCSX2 as a Profiler build (release + debug symbol)." echo "--release : Build PCSX2 as a Release build." echo echo "--clean : Do a clean build." diff --git a/cmake/BuildParameters.cmake b/cmake/BuildParameters.cmake index 96746ab616..d091bd5384 100644 --- a/cmake/BuildParameters.cmake +++ b/cmake/BuildParameters.cmake @@ -277,6 +277,9 @@ elseif(CMAKE_BUILD_TYPE MATCHES "Devel") set(DEBUG_FLAG "${DBG} -DNDEBUG -DPCSX2_DEVBUILD -D_DEVEL") elseif(CMAKE_BUILD_TYPE MATCHES "Release") set(DEBUG_FLAG "-DNDEBUG") +elseif(CMAKE_BUILD_TYPE MATCHES "Prof") + # Keep frame pointer and debug information for profiler tool + set(DEBUG_FLAG "${DBG} -DNDEBUG") endif() if (USE_ASAN)