Store build_date in .tizen.build-id section to avoid unnecessary rebuilds sandbox/jh0822kim/avoid_rebuilds
authorJunghyun Kim <jh0822.kim@samsung.com>
Tue, 30 Aug 2016 05:29:50 +0000 (14:29 +0900)
committerJunghyun Kim <jh0822.kim@samsung.com>
Tue, 30 Aug 2016 05:29:50 +0000 (14:29 +0900)
- PROBLEM
We use OBS to build packages in Tizen.
There is a mechanism not to rebuild if the result binary is the same.
For example, there is a dependency graph: A->B->C.
If A is modified, B would be built.
If the result RPM of B is not changed, OBS does not trigger a build of C.
To effectively use this mechanism, each packages make sure that
the result binary should be the same if the input source is the same.

This package uses __DATE__ and __TIME__ which make the result binary
is different everytime it is built.
To efficiently utilize OBS build mechanism and to modify the package
as little as possible, I propose to store this macro in .tizen.build-id
section. OBS build-compare tool does not check *.build-id section
in the binary.

Change-Id: I62771802ca1346b88d973d69eac85815947b704f
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
dali-toolkit/public-api/dali-toolkit-version.cpp
dali-toolkit/public-api/dali-toolkit-version.h

index ef55c84..cefe39f 100644 (file)
@@ -32,7 +32,7 @@ namespace Toolkit
 const unsigned int TOOLKIT_MAJOR_VERSION = 1;
 const unsigned int TOOLKIT_MINOR_VERSION = 1;
 const unsigned int TOOLKIT_MICRO_VERSION = 39;
-const char * const TOOLKIT_BUILD_DATE    = __DATE__ " " __TIME__;
+__attribute__ ((__section__(".tizen.build-id"))) const char TOOLKIT_BUILD_DATE[]    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
 namespace
index 9c59162..504ae47 100644 (file)
@@ -28,7 +28,7 @@ namespace Toolkit
 DALI_IMPORT_API extern const unsigned int TOOLKIT_MAJOR_VERSION; ///< The major version number of the Toolkit.
 DALI_IMPORT_API extern const unsigned int TOOLKIT_MINOR_VERSION; ///< The minor version number of the Toolkit.
 DALI_IMPORT_API extern const unsigned int TOOLKIT_MICRO_VERSION; ///< The micro version number of the Toolkit.
-DALI_IMPORT_API extern const char * const TOOLKIT_BUILD_DATE;    ///< The date/time the Toolkit library was built.
+DALI_IMPORT_API extern const char TOOLKIT_BUILD_DATE[];    ///< The date/time the Toolkit library was built.
 } // namespace Toolkit
 } // namespace Dali