[x265] [PATCH 1 of 3] common: move no-asm indication into build info string
Steve Borho
steve at borho.org
Tue Jun 30 20:08:26 CEST 2015
# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1435687510 18000
# Tue Jun 30 13:05:10 2015 -0500
# Node ID 856f5f548550468ffd497dc4cbb9b27ad9ed4f58
# Parent 61df434bea407ada1cfeea51ffb4fc7d8961476e
common: move no-asm indication into build info string
This is most helpful in static multilib situations:
% ./x265 -V
x265 [info]: HEVC encoder version 1.7+262-61df434bea40
x265 [info]: build info [Mac OS X][clang 6.1.0][64 bit] 8bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2
% ./x265 -V -D10
x265 [info]: HEVC encoder version 1.7+262-61df434bea40
x265 [info]: build info [Mac OS X][clang 6.1.0][64 bit][noasm] 10bit
x265 [info]: using cpu capabilities: none!
diff -r 61df434bea40 -r 856f5f548550 source/common/CMakeLists.txt
--- a/source/common/CMakeLists.txt Tue Jun 30 11:36:55 2015 -0500
+++ b/source/common/CMakeLists.txt Tue Jun 30 13:05:10 2015 -0500
@@ -2,6 +2,8 @@
if(ENABLE_ASSEMBLY)
set_source_files_properties(threading.cpp primitives.cpp PROPERTIES COMPILE_FLAGS -DENABLE_ASSEMBLY=1)
+ set_source_files_properties(version.cpp PROPERTIES COMPILE_FLAGS
+ "-DX265_VERSION=${X265_VERSION} -DENABLE_ASSEMBLY=1")
set(SSE3 vec/dct-sse3.cpp)
set(SSSE3 vec/dct-ssse3.cpp)
@@ -67,6 +69,8 @@
set(ASM_PRIMITIVES ${ASM_PRIMITIVES} x86/${SRC})
endforeach()
source_group(Assembly FILES ${ASM_PRIMITIVES})
+else(ENABLE_ASSEMBLY)
+ set_source_files_properties(version.cpp PROPERTIES COMPILE_FLAGS -DX265_VERSION=${X265_VERSION})
endif(ENABLE_ASSEMBLY)
check_symbol_exists(strtok_r "string.h" HAVE_STRTOK_R)
@@ -81,8 +85,6 @@
set(WINXP winxp.h winxp.cpp)
endif(WIN32)
-set_source_files_properties(version.cpp PROPERTIES COMPILE_FLAGS -DX265_VERSION=${X265_VERSION})
-
add_library(common OBJECT
${ASM_PRIMITIVES} ${VEC_PRIMITIVES}
${LIBCOMMON_SRC} ${LIBCOMMON_HDR} ${WINXP}
diff -r 61df434bea40 -r 856f5f548550 source/common/primitives.cpp
--- a/source/common/primitives.cpp Tue Jun 30 11:36:55 2015 -0500
+++ b/source/common/primitives.cpp Tue Jun 30 13:05:10 2015 -0500
@@ -240,8 +240,6 @@
#if ENABLE_ASSEMBLY
setupInstrinsicPrimitives(primitives, param->cpuid);
setupAssemblyPrimitives(primitives, param->cpuid);
-#else
- x265_log(param, X265_LOG_WARNING, "Assembly not supported in this binary\n");
#endif
setupAliasPrimitives(primitives);
diff -r 61df434bea40 -r 856f5f548550 source/common/version.cpp
--- a/source/common/version.cpp Tue Jun 30 11:36:55 2015 -0500
+++ b/source/common/version.cpp Tue Jun 30 13:05:10 2015 -0500
@@ -75,6 +75,12 @@
#else
#define NVM_BITS "[32 bit]"
#endif
+
+#if defined(ENABLE_ASSEMBLY)
+#define ASM ""
+#else
+#define ASM "[noasm]"
+#endif
#if CHECKED_BUILD
#define CHECKED "[CHECKED] "
@@ -91,4 +97,4 @@
#endif
const char* PFX(version_str) = XSTR(X265_VERSION);
-const char* PFX(build_info_str) = NVM_ONOS NVM_COMPILEDBY NVM_BITS CHECKED BITDEPTH;
+const char* PFX(build_info_str) = NVM_ONOS NVM_COMPILEDBY NVM_BITS ASM CHECKED BITDEPTH;
More information about the x265-devel
mailing list