[Tizen] Support GBS incremental build (#368)
author이형주/MDE Lab(SR)/삼성전자 <leee.lee@samsung.com>
Mon, 18 Dec 2023 03:29:22 +0000 (12:29 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Mon, 18 Dec 2023 03:29:22 +0000 (12:29 +0900)
* [Tizen] Support GBS incremental build
* [Tizen] Optimize patchelf step

.gitignore
packaging/coreclr.spec

index d58f673..bae4578 100644 (file)
@@ -36,6 +36,17 @@ msbuild.wrn
 *.lo
 *.o
 
+# GBS incremental build
+coreclr-debuginfo.manifest
+coreclr-debugsource.manifest
+coreclr.manifest
+debugfiles.list
+debuglinks.list
+debugsourcefiles.list
+debugsources.list
+documentation.list
+elfbins.list
+
 # Cross building rootfs
 cross/rootfs/
 cross/android-rootfs/
index 11b9cdd..e180c77 100755 (executable)
@@ -207,6 +207,8 @@ Publish crossgen2 as a single file with self-contained
 
 %prep
 %setup -q -n %{name}-%{version}
+
+%build
 cp %{SOURCE1} .
 
 %if 0%{skipmscorlib} && 0%{skipmanaged} && 0%{skipmanagedtools}
@@ -214,6 +216,10 @@ cp %{SOURCE1} .
 %ifarch %{arm} aarch64
 # Detect interpreter name from cross-gcc
 LD_INTERPRETER=$(patchelf --print-interpreter /emul/usr/bin/gcc)
+LD_LOCAL_INTERPRETER=$(patchelf --print-interpreter ./.dotnet/dotnet)
+
+%if "%{?LD_INTERPRETER}" == "%{?LD_LOCAL_INTERPRETER}"
+%else
 LD_RPATH=$(patchelf --print-rpath /emul/usr/bin/gcc)
 for file in $( find ./.dotnet ./.packages -name "dotnet" -type f -o -name "ilasm" -type f)
 do
@@ -225,6 +231,7 @@ do
     patchelf --set-rpath ${LD_RPATH}:%{_builddir}/%{name}-%{version}/libicu-57.1/ ${file}
 done
 %endif
+%endif
 
 %ifarch %{ix86}
 for file in $( find ./.dotnet ./.packages ./libicu-57.1 -iname "*.so" -or -iname "*.so.*" )
@@ -234,7 +241,6 @@ done
 %endif
 %endif
 
-%build
 # disable asan build when global forced asan build
 %{?asan:
 export ASAN_OPTIONS=use_sigaltstack=false:`cat /ASAN_OPTIONS`