diff --git a/.gitignore b/.gitignore index e019cfd..ba2e667 100644 --- a/.gitignore +++ b/.gitignore @@ -94,3 +94,4 @@ /gn-f99e015ac35f.tar.gz /gn-a2e2717ea670.tar.gz /gn-a3dcd7a7ad86.tar.gz +/gn-8b973aa51d02.tar.gz diff --git a/7bfa7b8.diff b/7bfa7b8.diff new file mode 100644 index 0000000..ce25a56 --- /dev/null +++ b/7bfa7b8.diff @@ -0,0 +1,46 @@ +From 7bfa7b89879797b92e119e0ff18ed89eea0937f7 Mon Sep 17 00:00:00 2001 +From: Reito +Date: Fri, 16 Feb 2024 02:13:23 +0800 +Subject: [PATCH] Fix MakeRelativePath regression + +Change-Id: Idfb52ffcbc38943ca5c8d231fae2fd0c50f20fd3 +--- + +diff --git a/src/gn/filesystem_utils.cc b/src/gn/filesystem_utils.cc +index d747289..8cd6b26 100644 +--- a/src/gn/filesystem_utils.cc ++++ b/src/gn/filesystem_utils.cc +@@ -684,15 +684,12 @@ + } + #endif + +-std::string MakeRelativePath(std::string_view input, +- std::string_view dest) { ++std::string MakeRelativePath(const std::string& input_raw, ++ const std::string& dest_raw) { + #if defined(OS_WIN) + // Regulate the paths. +- std::string input_regulated = RegulatePathIfAbsolute(input); +- std::string dest_regulated = RegulatePathIfAbsolute(dest); +- +- input = input_regulated; +- dest = dest_regulated; ++ const std::string input = RegulatePathIfAbsolute(input_raw); ++ const std::string dest = RegulatePathIfAbsolute(dest_raw); + + // On Windows, it is invalid to make a relative path across different + // drive letters. A relative path cannot span over different drives. +@@ -708,9 +705,12 @@ + if (input[0] != dest[0]) { + // If the drive letters are differnet, we have no choice but use + // the absolute path of input for correctness. +- return input_regulated; ++ return input; + } + } ++#else ++ const std::string& input = input_raw; ++ const std::string& dest = dest_raw; + #endif + + DCHECK(EndsWithSlash(dest)); diff --git a/gn.spec b/gn.spec index 77b9f15..c700aef 100644 --- a/gn.spec +++ b/gn.spec @@ -24,10 +24,10 @@ Name: gn # 7. Commit the changes # # See https://gn.googlesource.com/gn/+log for the latest changes. -%global commit a3dcd7a7ad861a9c1b9930a654f2feaeb03b4c0c -%global access 20240214 +%global commit 8b973aa51d02aa1ab327100007d4070c24b862b0 +%global access 20240215 %global shortcommit %(c='%{commit}'; echo "${c:0:12}") -%global position 2144 +%global position 2145 Version: %{position}^%{access}git%{shortcommit} Release: %autorelease Summary: Meta-build system that generates build files for Ninja @@ -52,6 +52,10 @@ Source2: update-version # intentional on their part Patch: gn-0153d369-no-O3.patch +# Fix MakeRelativePath regression +# https://gn-review.googlesource.com/c/gn/+/16700 +Patch: 7bfa7b8.diff + # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} diff --git a/last_commit_position.h b/last_commit_position.h index b248390..a256de4 100644 --- a/last_commit_position.h +++ b/last_commit_position.h @@ -3,7 +3,7 @@ #ifndef OUT_LAST_COMMIT_POSITION_H_ #define OUT_LAST_COMMIT_POSITION_H_ -#define LAST_COMMIT_POSITION_NUM 2144 -#define LAST_COMMIT_POSITION "2144 (a3dcd7a7ad86)" +#define LAST_COMMIT_POSITION_NUM 2145 +#define LAST_COMMIT_POSITION "2145 (8b973aa51d02)" #endif // OUT_LAST_COMMIT_POSITION_H_ diff --git a/sources b/sources index 207276d..a9a6947 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gn-a3dcd7a7ad86.tar.gz) = 3e0d60120a5c2bdd982f30fd0d8af91c666a5756aff0f7cdb7f144bc661daf1733bfda470a06058f40878009a37eb78bbef880f12f7ce4d56554ec6e3fe66306 +SHA512 (gn-8b973aa51d02.tar.gz) = 6c28acd683cd3fafadbbe8a374550a71e022a858d9686d8d806bf74b7539c47f7b891f695d0352d7633047a4463b47dd7f245d5c0ed7724a08d6b443423aa8b0