Build system/Package maintainer:
-    BUILDID is specified at cmake.
-    USAGE: cmake -DBUILDID=<ID> ../src

For developer builds the who typically don�t provide BUILDID, cmake will:
-    Determine the last git commit when this tree was syncd 
-    Deteremine the build date 
-    Check if tree is clean when built 

The idea of this embedded string is that later when you get a ROCR build, you can get some idea on the build origination by using: strings libhsa-runtime.so.1 | grep �ROCR BUILD ID�

For eg:
-    If it�s a Jenkins build 25, it returns: �ROCR  BUILD ID: 25�
-    If it�s a developer build sync'd @ 06f5f2a with modifications, it returns: �ROCR BUILD ID: 06f5f2a-2016-04-11-0"

[git-p4: depot-paths = "//depot/stg/hsa/drivers/hsa/runtime/": change = 1256588]


[ROCm/ROCR-Runtime commit: a148fd0b68]
Этот коммит содержится в:
Hari Thangirala
2016-04-11 15:03:06 -05:00
родитель de9132a710
Коммит 6a4a5f7c71
3 изменённых файлов: 17 добавлений и 0 удалений
+14
Просмотреть файл
@@ -97,6 +97,20 @@ add_definitions ( -DHSA_EXPORT=1 )
add_definitions ( -DHSA_EXPORT_FINALIZER=1 )
add_definitions ( -DHSA_EXPORT_IMAGES=1 )
if ( DEFINED BUILDID )
add_definitions ( -DROCR_BUILD_ID=${BUILDID})
else ( NOT DEFINED BUILDID)
## get date information based on UTC - full date
execute_process(COMMAND date --utc +%F WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_VARIABLE ROCR_BUILD_TIME OUTPUT_STRIP_TRAILING_WHITESPACE)
## get commit information
execute_process(COMMAND git rev-parse --short HEAD WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_VARIABLE ROCR_BUILD_COMMIT OUTPUT_STRIP_TRAILING_WHITESPACE)
## check dirty tree status
execute_process(COMMAND "git diff --shortstat 2> /dev/null|grep \"0 files changed\"|wc -l" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_VARIABLE ROCR_CLEAN_TREE OUTPUT_STRIP_TRAILING_WHITESPACE)
set ( BUILD_ID "${ROCR_BUILD_COMMIT}.${ROCR_BUILD_TIME}.${ROCR_CLEAN_TREE}")
add_definitions ( -DROCR_BUILD_ID=${BUILD_ID})
endif ()
## ------------------------- Linux Compiler and Linker options -------------------------
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -fexceptions -fno-rtti -fvisibility=hidden -Wno-error=sign-compare -Wno-sign-compare -Wno-write-strings -Wno-deprecated-declarations -Wno-conversion-null -fno-math-errno -fno-threadsafe-statics -fmerge-all-constants -fms-extensions -Wno-error=comment -Wno-comment -Wno-error=pointer-arith -Wno-pointer-arith -Wno-error=unused-variable -Wno-error=unused-but-set-variable -Wno-error=unused-function" )
+1
Просмотреть файл
@@ -1,3 +1,4 @@
ROCR_1
{
global:
hsa_init;
+2
Просмотреть файл
@@ -64,6 +64,8 @@
#define HSA_VERSION_MAJOR 1
#define HSA_VERSION_MINOR 0
const char rocrbuildid[] = "ROCR BUILD ID: " STRING(ROCR_BUILD_ID);
namespace core {
bool g_use_interrupt_wait = true;