* Handle trailing dots in LastTwoLabels() as in http://codereview.chromium.org/7518035/ . Rename this function to LastTwoComponents() to match the terminology used in the RegistryControlledDomainService and elsewhere in Chrome.
* Since callers are using std::string anyway, make the functions in the header take const std::string& instead of char*. This also allows doing string operations on them.
* Use string operations (like find_last_of()) in place of hand-written algorithms, for brevity, clarity, and safety.
* Avoid "unsigned", which the style guide forbids, and use allowed types like size_t, uint32, or int (depending on the situation).
* Avoid #define and "using".
* Use standard algorithms for similar reasons as using string ops.
* Use file_util functions to significantly abbreviate file reading/writing code.
* Use wmain() (on Windows) in combination with FilePath to avoid issues if the provided pathname has extended characters that don't flatten losslessly to the default codepage (thanks Darin for pointing out this issue).
* Avoid casting where possible. Avoid some casts for printf()-style calls by using a string stream, which also allows for slightly less boilerplate.
* Convert non-error uses of stderr to the chrome-standard VLOG(1).
* Correctly handle hostnames with trailing dots in the input file.
* In general, shorten code where possible.
Because this adds a dependency on base, and ssl_false_start_blacklist_process has the "#host" specifier in net.gyp, bradnelson tells me that base and its dependencies need an explicit "host, target" toolchain list for the Linux builds to work correctly. It would be nice if we could avoid this but I guess gyp would have to be smarter or something.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7550002TBR=pkasting@chromium.org
Review URL: http://codereview.chromium.org/7623015
git-svn-id: http://src.chromium.org/svn/trunk/src/build@96391 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Now that r96121 has landed, this should not cause compile failures when compiling base/ on the host.
Original comments follow.
Numerous changes, including:
* Handle trailing dots in LastTwoLabels() as in http://codereview.chromium.org/7518035/ . Rename this function to LastTwoComponents() to match the terminology used in the RegistryControlledDomainService and elsewhere in Chrome.
* Since callers are using std::string anyway, make the functions in the header take const std::string& instead of char*. This also allows doing string operations on them.
* Use string operations (like find_last_of()) in place of hand-written algorithms, for brevity, clarity, and safety.
* Avoid "unsigned", which the style guide forbids, and use allowed types like size_t, uint32, or int (depending on the situation).
* Avoid #define and "using".
* Use standard algorithms for similar reasons as using string ops.
* Use file_util functions to significantly abbreviate file reading/writing code.
* Use wmain() (on Windows) in combination with FilePath to avoid issues if the provided pathname has extended characters that don't flatten losslessly to the default codepage (thanks Darin for pointing out this issue).
* Avoid casting where possible. Avoid some casts for printf()-style calls by using a string stream, which also allows for slightly less boilerplate.
* Convert non-error uses of stderr to the chrome-standard VLOG(1).
* Correctly handle hostnames with trailing dots in the input file.
* In general, shorten code where possible.
Because this adds a dependency on base, and ssl_false_start_blacklist_process has the "#host" specifier in net.gyp, bradnelson tells me that base and its dependencies need an explicit "host, target" toolchain list for the Linux builds to work correctly. It would be nice if we could avoid this but I guess gyp would have to be smarter or something.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7550002TBR=pkasting@chromium.org
Review URL: http://codereview.chromium.org/7529035TBR=fischman@chromium.org
Review URL: http://codereview.chromium.org/7587003
git-svn-id: http://src.chromium.org/svn/trunk/src/build@96211 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
* Handle trailing dots in LastTwoLabels() as in http://codereview.chromium.org/7518035/ . Rename this function to LastTwoComponents() to match the terminology used in the RegistryControlledDomainService and elsewhere in Chrome.
* Since callers are using std::string anyway, make the functions in the header take const std::string& instead of char*. This also allows doing string operations on them.
* Use string operations (like find_last_of()) in place of hand-written algorithms, for brevity, clarity, and safety.
* Avoid "unsigned", which the style guide forbids, and use allowed types like size_t, uint32, or int (depending on the situation).
* Avoid #define and "using".
* Use standard algorithms for similar reasons as using string ops.
* Use file_util functions to significantly abbreviate file reading/writing code.
* Use wmain() (on Windows) in combination with FilePath to avoid issues if the provided pathname has extended characters that don't flatten losslessly to the default codepage (thanks Darin for pointing out this issue).
* Avoid casting where possible. Avoid some casts for printf()-style calls by using a string stream, which also allows for slightly less boilerplate.
* Convert non-error uses of stderr to the chrome-standard VLOG(1).
* Correctly handle hostnames with trailing dots in the input file.
* In general, shorten code where possible.
Because this adds a dependency on base, and ssl_false_start_blacklist_process has the "#host" specifier in net.gyp, bradnelson tells me that base and its dependencies need an explicit "host, target" toolchain list for the Linux builds to work correctly. It would be nice if we could avoid this but I guess gyp would have to be smarter or something.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7550002TBR=pkasting@chromium.org
Review URL: http://codereview.chromium.org/7529035
git-svn-id: http://src.chromium.org/svn/trunk/src/build@95910 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
* Handle trailing dots in LastTwoLabels() as in http://codereview.chromium.org/7518035/ . Rename this function to LastTwoComponents() to match the terminology used in the RegistryControlledDomainService and elsewhere in Chrome.
* Since callers are using std::string anyway, make the functions in the header take const std::string& instead of char*. This also allows doing string operations on them.
* Use string operations (like find_last_of()) in place of hand-written algorithms, for brevity, clarity, and safety.
* Avoid "unsigned", which the style guide forbids, and use allowed types like size_t, uint32, or int (depending on the situation).
* Avoid #define and "using".
* Use standard algorithms for similar reasons as using string ops.
* Use file_util functions to significantly abbreviate file reading/writing code.
* Use wmain() (on Windows) in combination with FilePath to avoid issues if the provided pathname has extended characters that don't flatten losslessly to the default codepage (thanks Darin for pointing out this issue).
* Avoid casting where possible. Avoid some casts for printf()-style calls by using a string stream, which also allows for slightly less boilerplate.
* Convert non-error uses of stderr to the chrome-standard VLOG(1).
* Correctly handle hostnames with trailing dots in the input file.
* In general, shorten code where possible.
Because this adds a dependency on base, and ssl_false_start_blacklist_process has the "#host" specifier in net.gyp, bradnelson tells me that base and its dependencies need an explicit "host, target" toolchain list for the Linux builds to work correctly. It would be nice if we could avoid this but I guess gyp would have to be smarter or something.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7550002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@95907 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This is essentially a OO wrapper over the Wayland library. It will be used to
add Wayland support for Chrome.
This was written with the intent of being as standalone as possible and it
should not require any external Chrome dependencies.
BUG=None
TEST=None
R=evan@chromium.org
Review URL: http://codereview.chromium.org/7457023
git-svn-id: http://src.chromium.org/svn/trunk/src/build@94492 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This is the first patch for our own D-Bus client library.
The D-Bus client code will be placed under 'dbus' on the top level directory
More patches will follow.
BUG=90036
TEST=try bot to make sure this won't break builds.
Review URL: http://codereview.chromium.org/7467031
git-svn-id: http://src.chromium.org/svn/trunk/src/build@93658 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
In order to make the GNOME Keyring API mockable, I've substituted evil preprocessor macros with a slightly less evil scoping trick, and used it even when linking directly.
I'm not sure when password_store_x_unittest fell out of the gyp file, but it hasn't been compiled for some time apparently so it required a bit of cleanup to make it compile.
I also did a little unrelated cleanup in the gyp files and fixed typos in password_store_default_unittest.
BUG=none
Review URL: http://codereview.chromium.org/7396013
git-svn-id: http://src.chromium.org/svn/trunk/src/build@93093 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Chromium has also been built on other BSDs, so rather than adding each Unix to every gyp file individually every time another port is added, these broad defines can be used instead and modified with specific logic only where necessary.
I included a few modified gyp files so the usage can be seen. I also added sunos5 to some grd/html files and set the default host_arch on i86pc solaris to ia32.
BUG=0
TEST={}
Patch by ruben <chromium@hybridsource.org>.
Review URL: http://codereview.chromium.org/6965007
git-svn-id: http://src.chromium.org/svn/trunk/src/build@85154 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This CL removes duplication and fixes a build error
on system with no CUPS. It uses cups-config instead of
hardcoding flags.
Also, it removes a superfluous dependency on gcrypt
from chrome_browser.gypi. printing uses gcrypt explicitly,
but chrome/browser doesn't. It was just blindly copy-pasted.
I just extracted libgcrypt target to build/linux/system.gyp,
and switched to libgcrypt-config instead of hardcoding flags.
BUG=none
Review URL: http://codereview.chromium.org/6883221
git-svn-id: http://src.chromium.org/svn/trunk/src/build@83489 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This allows us to test experimental library features, and to track a known openssl version.
Also bumps OpenSSL 65717:68738, to fix up the default CA root path in the reference library.
BUG=None
TEST=Still builds & runs!
Review URL: http://codereview.chromium.org/5625012
git-svn-id: http://src.chromium.org/svn/trunk/src/build@68749 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
http://codereview.chromium.org/4516002/show had to be reverted because it
conflicts with "old style" sysroots that are still used on the arm builders.
This is a cleaner approach that should work there.
The previous approach assumed that all variables in .pc files were relative to |prefix|. It would be a desirable thing to have but in practice a few packages don't follow this and have already dereferenced |prefix| in other variables (e.g. |libdir|). So instead of forcing |prefix|, this version keeps the original one but strips the path before '/usr' (in |prefix|) from all returned paths before prepending the sysroot path.
For example if you have foo.pc:
prefix=/build/board/usr
libdir=/build/board/usr/lib # instead of libdir=${prefix}/lib
Libs: -L${libdir}/foo -lfoo
Then instead of forcing prefix=/usr (which doesn't fix |libdir|), we find the path before '/usr' in prefix ('/build/board'), that we strip from the returned -L flag ('/build/board/usr/lib/foo' -> '/usr/lib/foo') before prepending the sysroot path (-> '/path/to/sysroot/usr/lib/foo').
BUG=None
TEST=build with sysroot=/path/to/chromiumos/chroot/build/x86-generic
Review URL: http://codereview.chromium.org/5105005
git-svn-id: http://src.chromium.org/svn/trunk/src/build@66712 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
* added new xtst target in build/linux/system.gyp
BUG=chromium-os:5902
TEST=goto youtube, open flash menu then kick off the screen locker. It used to show spinner and eventually crash. It should close the menu and lock, and will not crash.
Review URL: http://codereview.chromium.org/5043002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@66662 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
unit_tests fails to link due to requirement on libXi. This is implicitly
provided by 'gdk', but unit_tests does not depend on this target. We add
a 'xi' dependency for any target depending on 'x11'.
BUG=63209
TEST=None
(Landing patch for jknotten@chromium.org.)
Review URL: http://codereview.chromium.org/5016001
git-svn-id: http://src.chromium.org/svn/trunk/src/build@66169 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Some pkg-config packages in chromium os (e.g. gtk) end up hard-coding libdir to be absolute (rather than relative to prefix), so it breaks builds from outside the chroot.
This works around it.
BUG=none
TEST=build with sysroot=/path/to/chromiumos/chroot/build/x86-generic
Review URL: http://codereview.chromium.org/4516002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@65580 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This is early in-progress implementation, no cert handling supported. So only available under a build-time flag. (GYP_DEFINES="'use_openssl=1'")
Adds a new build dependency for system OpenSSL libraries, and a new USE_OPENSSL define. Eventually this will disable USE_NSS but for now the two coexist.
BUG=none
TEST=build with use_openssl=1. Goto some https:// pages.
Review URL: http://codereview.chromium.org/3495005
git-svn-id: http://src.chromium.org/svn/trunk/src/build@60936 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
In the chroot used for building Chromium OS, gnome-keyring
is not installed so the gyp fails with the errors like:
Exception: Call to 'pkg-config --cflags gnome-keyring-1' returned exit status 1. while loading dependencies of src/base/base.gyp while loading dependencies of src/net/net.gyp while loading dependencies of src/app/app.gyp while loading dependencies of src/build/all.gyp while trying to load src/build/all.gyp
failed to run command: /usr/bin/python src/build/gyp_chromium
BUG=chromium-os:4000
TEST=Tested on Ubuntu and in the chroot:
On Ubuntu:
% sudo apt-get remove libgnome-keyring-dev
% GYP_DEFINES="chromeos=0" gclient runhooks'
... gyp fails as libgnome-keyring-dev is not installed ...
% GYP_DEFINES="chromeos=1" gclient runhooks'
... gyp succeeds ...
In the chromium os build chroot:
% emerge-x86-generic chromeos-chrome
... gyp suceeds ...
Review URL: http://codereview.chromium.org/2729010
git-svn-id: http://src.chromium.org/svn/trunk/src/build@49373 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
SSLClientSocketMac. Specify the --use-nss-for-ssl command-line
option to use SSLClientSocketNSS.
The nss.gyp in src/net/third_party/nss is renamed ssl.gyp to avoid
a naming conflict with the nss.gyp in src/third_party/nss. The
GYP generator for Xcode project files disallows same-named .gyp files.
SSL client authentication doesn't work yet.
R=mark
BUG=30689
TEST=No build and test failures on Mac and Windows.
Review URL: http://codereview.chromium.org/2322008
git-svn-id: http://src.chromium.org/svn/trunk/src/build@48650 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This lets us use portage-based cross-compiled sysroots, that force the prefix to be an absolute path within the portage chroot.
In particular that lets us build the ARM sysroot using the Chrome OS build system.
Ubuntu-based sysroots already have prefix=/usr, so this is a no-op in that case.
Review URL: http://codereview.chromium.org/669139
git-svn-id: http://src.chromium.org/svn/trunk/src/build@40712 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
When compiling with the new portage build system for Chromium OS,
paths passed in for includes, libraries, etc., are already properly
prefixed with the sysroot and do not need to be again prefixed with
the sysroot.
Review URL: http://codereview.chromium.org/652067
git-svn-id: http://src.chromium.org/svn/trunk/src/build@39655 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
- only include cflags/linkflags and other compiler settings that are target-specific when building for 'target'
- make build tools (protoc) compile for 'host', and change the dependencies on them to reflect that.
Review URL: http://codereview.chromium.org/265031
git-svn-id: http://src.chromium.org/svn/trunk/src/build@30381 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Why: Simpler build code. If everybody includes it, it should be included automatically.
Why now: The webkit chromium builds need it be specified, since can't default to build/common.gypi.
What was done:
1. build/common.gypi's contents were moved to a new file build/gyp_chromium.gypi
2. tools/gyp/gyp_chromium was moved to build/gyp_chromium and made to automatically include build/gyp_chromium.gypi.
3. lots of gyp files were fixed to not refer to build/common.gypi any more.
4. o3d which also builds independently of chrome, was fixed to have a gyp_o3d that includes gyp_chromium.gypi too.
5. build/common.gypi was left empty, because there are some external projects that still refer to it.
Things that are left to do after this patch is in:
1. The following external files (in other repositories) need to stop include common.gypi
./third_party/hunspell/hunspell.gyp
./third_party/icu/icu.gyp
./v8/tools/gyp/v8.gyp
2. Once nobody refers to common.gypi anymore, delete common.gypi
-or-
Delete gyp_chromium.gypi and move its content back to common.gypi
Tested on mac, win and linux. On win, got a few unit tests errors on chrome bookmarks, which should not be related. I'm running again with clobber to verify.
Review URL: http://codereview.chromium.org/206006
git-svn-id: http://src.chromium.org/svn/trunk/src/build@26302 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This patch adds support for a selinux GYP variable which, when set to
one, does the following:
* Removes the seccomp sandbox from the compile
* Removes support for SUID sandboxing from the zygote
* Performs a dynamic transition, in the zygote, to
chromium_renderer_t.
This code requires that the system policy have a sensible set of
access vectors for the chromium_renderer_t type. Such a policy will be
found in sandbox/selinux in the future.
http://codereview.chromium.org/203071
git-svn-id: http://src.chromium.org/svn/trunk/src/build@26257 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This CL adds support for a 'sysroot' GYP define, that should point to the target root filesystem for cross-compilation.
It passes that argument to the compiler and linker which uses it to prefix its hard-coded path (e.g. /usr/include)
It also points pkg-config to look for package configs there, and rewrite the paths to be prefixed by 'sysroot' (since pkg-config doesn't do it itself)
Review URL: http://codereview.chromium.org/199016
git-svn-id: http://src.chromium.org/svn/trunk/src/build@25418 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
According to glib docs, we need to do this if it's at all possible
for us to hit glib on multiple threads. This may be happening
when we grab plugin metadata from the file thread.
Rather than explicitly depending on gthread all over the place,
just put it in with the GTK dep (since anywhere we're using GTK
we ought to init gthread).
(Note that this is *not* initializing the GDK locking system.)
BUG=18957
Review URL: http://codereview.chromium.org/174264
git-svn-id: http://src.chromium.org/svn/trunk/src/build@24207 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
According to glib docs, we need to do this if it's at all possible
for us to hit glib on multiple threads. This may be happening
when we grab plugin metadata from the file thread.
Rather than explicitly depending on gthread all over the place,
just put it in with the GTK dep (since anywhere we're using GTK
we ought to init gthread).
(Note that this is *not* initializing the GDK locking system.)
BUG=18957
Review URL: http://codereview.chromium.org/174264
git-svn-id: http://src.chromium.org/svn/trunk/src/build@24203 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
According to glib docs, we need to do this if it's at all possible
for us to hit glib on multiple threads. This may be happening
when we grab plugin metadata from the file thread.
Rather than explicitly depending on gthread all over the place,
just put it in with the GTK dep (since anywhere we're using GTK
we ought to init gthread).
(Note that this is *not* initializing the GDK locking system.)
BUG=18957
Review URL: http://codereview.chromium.org/174264
git-svn-id: http://src.chromium.org/svn/trunk/src/build@24148 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This script was trying to only rebuild the symbols when the binary
file was more recent than the symbols file. However, -nt fails when
the right hand side doesn't exist. Therefore it wouldn't actually dump
symbols and the sed script would fail later on.
This adds a test for the non-existance of the output file first.
TBR=mmoss
git-svn-id: http://src.chromium.org/svn/trunk/src/build@18659 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
The alternative is that gyp silently succeeds and your build mysteriously
doesn't link, even after you've installed the dependencies, and you need
to know to rerun "gclient runhooks --force".
BUG=11432
Review URL: http://codereview.chromium.org/114007
git-svn-id: http://src.chromium.org/svn/trunk/src/build@16002 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
- Remove pangoft2, we don't use it anywhere.
- Add gdk, fontconfig and freetype2 as dependencies of skia. Gdk is
used in platform_canvas_linux.
- X11, Xrender and Xext are used by the IPC system, so everything that
depends on common, needs to link in those libs. By moving the
link_settings line into the libcommon.a target, all projects
inherit these.
Review URL: http://codereview.chromium.org/60070
git-svn-id: http://src.chromium.org/svn/trunk/src/build@13055 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
* Add Linux settings to target_defaults in common.gypi so
gyp-generated SConscript files no longer depend on
build/SConscript.main or the Hammer infrastructure.
* Copy the FilterOut() function from Hammer to the chromium_builders.py
Tool module.
* Add a ChromiumLoadableModule() builder to chromium_builders.py.
* Add dependencies on the 'views' library to the chrome link (target 'app').
* Add missing views/*/*_unittest.cc modules to the 'unit_tests' target.
Exclude all but the one that builds on Linux from the non-Windows builds.
* Crib a list of chrome/views files to exclude from the Linux build
from the old SCons configuration.
* Add a new build/linux/system.gyp file with new 'settings' targets
to encapsulate the pkg-config checks for gtk+-2.0, nss and pangoft2.
* Add depenedencies in the other targets on the new gtk, nss and
pangoft2 'settings' targets from build/linux/system.gyp.
* Add a pkg_config_wrapper.py script that keeps gyp happy by
simply exiting 0 if the package isn't found.
* DEPS roll for latest gyp changes to support the above.
Review URL: http://codereview.chromium.org/42340
git-svn-id: http://src.chromium.org/svn/trunk/src/build@12228 4ff67af0-8c30-449e-8e8b-ad334ec8d88c