How to recompile only changed parts of chromium? - google-chrome

I built Chromium from the source code (ninja -C out/Debug chrome) and make sure it works. After I executed:
git pull
gclient sync
ninja -C out/Debug chrome
The build system actually starts to building all the parts of the project again. Is it possible to rebuild only the changed parts of chromium?

Always do release build if you don't want to debug chrome browser.
Use ninja -C out/Release chrome to perform a release build. Debug build takes time in linking.
git pull updates your code and gclient sync syncs or sets the HEAD of the repo to the Last Known Good Revision(LKGR). Hence, no. of changed files plus no. of files which were dependent on that would be recompiled again.

From the windows build instructions it lists this build parameter:
is_component_build = true - this uses more, smaller DLLs, and incremental linking.
Execute:
gn args out/WhateverYouWant
Add
is_component_build = true
to the text file, save it, and close it.
For every build after the first it won't compile any components that you haven't changed.

Related

Why is shadow-cljs returning this error message on "Stale Output"? How to guarantee the watch for this building is running?

I am new to Clojure and not a pro in Javascript. I am watching the free part of the course on Reagent.
Following the instructions on the course's repo, after doing the git clone and the npm install, the author indicates running $ npm run dev. Everything seems to work fine. I can see the app on my http://localhost:3000/.
The favicon with the app's logo and its name is loaded on the corner of the browser's tab:
However, on the bottom of the web page, there is this error message from shadow-cljs:
shadow-cljs - Stale Output! Your loaded JS was not produced by the
running shadow-cljs instance. Is the watch for this build running?
Why is this happening? How should I fix it?
How to guarantee that the watch for this building is running?
Is there a simple command to run on terminal to check this?
Obs. 1: If this is relevant, my operational system is NixOS and this is my config file.
Obs. 2: I am not sure if this question is connected to my previous question on npm and Cider (Emacs IDE for Clojure) that happened while working with this same repo.
It is likely that this is due to you running npm run dev AND cider-jack-in.
I don't use emacs, so I'm not exactly sure what cider-jack-in does, but I believe it launches a new JVM. Since the npm run dev also did that you end up with two running JVMs, which also means two running shadow-cljs instances. That is not ideal and they will start interfering with each other leading to errors such as yours.
So, either you run npm run dev and use emacs to connect to that server. cider-connect or whatever is called should do that.
Or you don't run npm run dev at all and instead only cider-jack-in and then start the watch from the REPL.
Don't forget to first kill all java processes that might be running for that project. As long as there is more than one shadow-cljs process running for the project things will be weird.
This happens to me when I clicked on the build link BEFORE it has compiled. In which case, the link is displaying a previously compiled version, not the live version, and "watch" on code changes doesn't work either. Just wait for your terminal output to say "compiled" before clicking on the link.

How to checkout and BUILD specific chromium tag/branch without download the FULL source code of all history?

I don't want build master branch. Instead I would like to build a specific tag which the latest stable release as same as my Desktop Chrome.
This is probably the fastest way to fetch Chromium's source code. Suppose 59.0.3071.115 is the version of Chromium, you wish to build. You run this command:
git fetch https://chromium.googlesource.com/chromium/src.git +refs/tags/59.0.3071.115:chromium_59.0.3071.115
If you don't want the history to be fetched (faster fetching of Chromium source code):
git fetch https://chromium.googlesource.com/chromium/src.git +refs/tags/59.0.3071.115:chromium_59.0.3071.115 --depth 1
Now from your Chromium repo, use the following command to show a list of tags available
git tag
You have to checkout that tag by running
git checkout tags/59.0.3071.115
Then run these commands in the order listed below to pull all the third-party dependencies:
gclient sync
gclient sync --with_branch_heads
gclient runhooks
You can find the dev, beta, canary, latest and stable version info of Chromium from this page: https://www.chromium.org/developers/calendar
Now, you should be able to build Chromium. Let me know, if it works

xcodebuild: disabling "Parallelize build" (Xcode 7)

We're using xcodebuild command line to build our nightly jobs, specifying project, target, and configuration.
It seems like the build is done with "Parallelize build" set to "YES" by default, although we're not using schemes for the nightly builds.
This causes build errors (in detail: lipo tool tries to create a universal binary before both architectures complete building).
How can I disable the parallelization in the command line without having to create a scheme?
Ok, I've created a shared scheme (so I could later save it in the source control) and used it to define the parallelization state. That worked for me.

How do I remove the -C parameter from cvs update in a Hudson build

I can't find where I can configure the parameters that hudson uses in CVS checkout and update.
I have a situation where I modify build properties file locally before I kick off a hudson build. However because the cvs update contains a '-C' it overwrites my local changes. Do you know of a way where I can remove this?
Any help much appreciated,
Paul
You are confusing me. How do you change the build properties locally before kicking off the build? If I need to do something like that, I first get the code from my SCM and then run a script to make changes (like changing the build properties) and than start the actual build process (usually by kicking off maven or ant). The whole purpose of a CI (what Hudson is supposed to be used for) is to have a reproducible build. Manual steps during a build usually do not count as reproducible.

Hudson build fails when run in browser but works from command line

I am setting up a new Hudson task (on WinXP) for a project which generates javascript files, and performs xslt transformations as part of the build process.
The ant build is failing on the XSL transformations when run from Hudson, but works fine when the same build on the same codebase (ie in Hudson's workspace) is run from the command line.
The failure message is:
line 208: Variable 'screen' is multiply defined in the same scope.
I have tried configuring Hudson to use both ant directly and to use a batch script - both fail in Hudson.
I have tried in Firefox, IE6 and Chrome and have seen the same issue.
Can anyone suggest how we can workaround this problem with Hudson?
Problem solved.
Our build is actually dependent on jdk 1.4.2, and Hudson appears to run using 1.6. When I set Hudson to run as a service, it ran as my local user, which meant that it picked up the 1.4.2 JAVA_HOME environment variable - and therefore worked.
I guess another possible solution is to configure Hudson to use 1.4.2 by default.
I would assume this is not an issue with Hudson directly, as it is with the build script and/or the environment itself.
Is your build script relying on certain environment variables being defined, or worse, the job running from within a certain directory structure (i.e. it works if it's run from under /home/mash/blah but not from under another directory like /tmp)? Is the build script making reference to external files by relative paths?
These are the things I would look into. For environment variables, you can tell Hudson to pass these into Ant. For the other issues, you probably want to change your build script. Check the console output provided by Hudson, and maybe set Ant to print verbose/debug messages to get a better idea about the environment/filepaths.