|
|
Created:
6 years, 8 months ago by scottmg Modified:
6 years, 8 months ago CC:
chromium-reviews Base URL:
svn://svn.chromium.org/chrome/trunk/src Visibility:
Public. |
DescriptionMake resource repacker work on Windows
Add pragma compatible with cl, and make parser less strict
about the stuff around whitelisted_resource_NNNN.
R=aurimas@chromium.org,thakis@chromium.org
BUG=338759
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=263820
Patch Set 1 #
Total comments: 4
Messages
Total messages: 15 (0 generated)
https://codereview.chromium.org/237663003/diff/1/build/common.gypi File build/common.gypi (right): https://codereview.chromium.org/237663003/diff/1/build/common.gypi#newcode1914 build/common.gypi:1914: ['enable_resource_whitelist_generation==1 and OS!="win"', { I guess we might want a clang==0 in here, but since enable_resource_whitelist_generation is a manual thing anyway, doesn't seem worth cluttering things for.
On 2014/04/14 23:35:26, scottmg wrote: > https://codereview.chromium.org/237663003/diff/1/build/common.gypi > File build/common.gypi (right): > > https://codereview.chromium.org/237663003/diff/1/build/common.gypi#newcode1914 > build/common.gypi:1914: ['enable_resource_whitelist_generation==1 and > OS!="win"', { > I guess we might want a clang==0 in here, but since > enable_resource_whitelist_generation is a manual thing anyway, doesn't seem > worth cluttering things for. LGTM
lgtm https://codereview.chromium.org/237663003/diff/1/tools/resources/find_used_re... File tools/resources/find_used_resources.py (right): https://codereview.chromium.org/237663003/diff/1/tools/resources/find_used_re... tools/resources/find_used_resources.py:24: On Windows, the message is simply a message via __pragma(message(...)). Hm, I wonder if we could do the same on non-win: #define DO_PRAGMA(x) _Pragma (#x) #define FOO(x) DO_PRAGMA(message ("TODO - " #x)) (from http://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html)
https://codereview.chromium.org/237663003/diff/1/tools/resources/find_used_re... File tools/resources/find_used_resources.py (right): https://codereview.chromium.org/237663003/diff/1/tools/resources/find_used_re... tools/resources/find_used_resources.py:24: On Windows, the message is simply a message via __pragma(message(...)). On 2014/04/14 23:42:00, Nico wrote: > Hm, I wonder if we could do the same on non-win: > > #define DO_PRAGMA(x) _Pragma (#x) > #define FOO(x) DO_PRAGMA(message ("TODO - " #x)) > > > (from http://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html) From the chromium-dev thread titled "generated_resources.grd" I got the impression it didn't work for some reason? Maybe it does on a newer GCC or something, Aurimas?
The CQ bit was checked by scottmg@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/scottmg@chromium.org/237663003/1
https://codereview.chromium.org/237663003/diff/1/tools/resources/find_used_re... File tools/resources/find_used_resources.py (right): https://codereview.chromium.org/237663003/diff/1/tools/resources/find_used_re... tools/resources/find_used_resources.py:24: On Windows, the message is simply a message via __pragma(message(...)). On 2014/04/14 23:45:20, scottmg wrote: > On 2014/04/14 23:42:00, Nico wrote: > > Hm, I wonder if we could do the same on non-win: > > > > #define DO_PRAGMA(x) _Pragma (#x) > > #define FOO(x) DO_PRAGMA(message ("TODO - " #x)) > > > > > > (from http://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html) > > From the chromium-dev thread titled "generated_resources.grd" I got the > impression it didn't work for some reason? Maybe it does on a newer GCC or > something, Aurimas? pragma message is not supported on gcc used to build Chrome for Android :(
On 2014/04/14 23:53:04, aurimas wrote: > https://codereview.chromium.org/237663003/diff/1/tools/resources/find_used_re... > File tools/resources/find_used_resources.py (right): > > https://codereview.chromium.org/237663003/diff/1/tools/resources/find_used_re... > tools/resources/find_used_resources.py:24: On Windows, the message is simply a > message via __pragma(message(...)). > On 2014/04/14 23:45:20, scottmg wrote: > > On 2014/04/14 23:42:00, Nico wrote: > > > Hm, I wonder if we could do the same on non-win: > > > > > > #define DO_PRAGMA(x) _Pragma (#x) > > > #define FOO(x) DO_PRAGMA(message ("TODO - " #x)) > > > > > > > > > (from http://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html) > > > > From the chromium-dev thread titled "generated_resources.grd" I got the > > impression it didn't work for some reason? Maybe it does on a newer GCC or > > something, Aurimas? > > pragma message is not supported on gcc used to build Chrome for Android :( Huh? I thought it's supported since 4.4ish (?)
On 2014/04/14 23:58:03, Nico wrote: > On 2014/04/14 23:53:04, aurimas wrote: > > > https://codereview.chromium.org/237663003/diff/1/tools/resources/find_used_re... > > File tools/resources/find_used_resources.py (right): > > > > > https://codereview.chromium.org/237663003/diff/1/tools/resources/find_used_re... > > tools/resources/find_used_resources.py:24: On Windows, the message is simply a > > message via __pragma(message(...)). > > On 2014/04/14 23:45:20, scottmg wrote: > > > On 2014/04/14 23:42:00, Nico wrote: > > > > Hm, I wonder if we could do the same on non-win: > > > > > > > > #define DO_PRAGMA(x) _Pragma (#x) > > > > #define FOO(x) DO_PRAGMA(message ("TODO - " #x)) > > > > > > > > > > > > (from http://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html) > > > > > > From the chromium-dev thread titled "generated_resources.grd" I got the > > > impression it didn't work for some reason? Maybe it does on a newer GCC or > > > something, Aurimas? > > > > pragma message is not supported on gcc used to build Chrome for Android :( > > Huh? I thought it's supported since 4.4ish (?) We are using gcc 4.6.3. If I modify the define to be: #define IDR_TRANSLATE_INTERNALS_TRANSLATE_INTERNALS_HTML _Pragma("message(\"aurimas\")") 28500 I get an error: chrome/browser/ui/webui/translate_internals/translate_internals_ui.cc:51:1: error: '#pragma' is not allowed here Oddly, it is perfectly fine if I put _Pragma("message(\"aurimas\")") in that cc file directly outside of #define. My theory is that using pragma messages inside of #define is different in our gcc.
The CQ bit was unchecked by commit-bot@chromium.org
The commit queue went berserk retrying too often for a seemingly flaky test on builder android_dbg: http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=android_db... http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=android_db... http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=android_db... http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=android_db... http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=android_db...
The CQ bit was checked by scottmg@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/scottmg@chromium.org/237663003/1
Message was sent while issue was closed.
Change committed as 263820
Filed http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60875 On Mon, Apr 14, 2014 at 5:07 PM, <aurimas@chromium.org> wrote: > On 2014/04/14 23:58:03, Nico wrote: > >> On 2014/04/14 23:53:04, aurimas wrote: >> > >> > > https://codereview.chromium.org/237663003/diff/1/tools/ > resources/find_used_resources.py > >> > File tools/resources/find_used_resources.py (right): >> > >> > >> > > https://codereview.chromium.org/237663003/diff/1/tools/ > resources/find_used_resources.py#newcode24 > >> > tools/resources/find_used_resources.py:24: On Windows, the message is >> simply >> > a > >> > message via __pragma(message(...)). >> > On 2014/04/14 23:45:20, scottmg wrote: >> > > On 2014/04/14 23:42:00, Nico wrote: >> > > > Hm, I wonder if we could do the same on non-win: >> > > > >> > > > #define DO_PRAGMA(x) _Pragma (#x) >> > > > #define FOO(x) DO_PRAGMA(message ("TODO - " #x)) >> > > > >> > > > >> > > > (from http://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html) >> > > >> > > From the chromium-dev thread titled "generated_resources.grd" I got >> the >> > > impression it didn't work for some reason? Maybe it does on a newer >> GCC or >> > > something, Aurimas? >> > >> > pragma message is not supported on gcc used to build Chrome for Android >> :( >> > > Huh? I thought it's supported since 4.4ish (?) >> > > We are using gcc 4.6.3. > > If I modify the define to be: > #define IDR_TRANSLATE_INTERNALS_TRANSLATE_INTERNALS_HTML > _Pragma("message(\"aurimas\")") 28500 > > I get an error: > chrome/browser/ui/webui/translate_internals/translate_ > internals_ui.cc:51:1: > error: '#pragma' is not allowed here > > Oddly, it is perfectly fine if I put _Pragma("message(\"aurimas\")") in > that cc > file directly outside of #define. > > My theory is that using pragma messages inside of #define is different in > our > gcc. > > https://codereview.chromium.org/237663003/ > To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org. |