no-bug: A few quality-of-life tweaks, take 2#13637
Conversation
|
I've rebased and resolved the merge conflict, and also tweaked the Linux |
| # bin directory | ||
| if test "$CC" && test "$CXX"; then | ||
| true | ||
| elif test -d "$HOME/.mozbuild/clang/bin"; then |
There was a problem hiding this comment.
Not sure about this, maybe instead, we should just define CC and CXX if ZEN_RELEASE tests true?
There was a problem hiding this comment.
It's still good to set the variables generally, because the configuration might default to gcc/g++ otherwise. And the user might want to do a ZEN_RELEASE build using their compilers instead of the ones in .mozbuild/.
There was a problem hiding this comment.
In that case, you should just use your own mozconfig file at the root directory to override these
There was a problem hiding this comment.
That's non-obvious, however, for just overriding the compilers. It's customary across many build systems to use CC/CXX when set in the environment, and especially when the user isn't familiar with the ins and outs of the build system, supporting common conventions like that helps make it easier to deal with.
In any event, nothing changes here unless both variables are set, to avoid any ambiguity.
There was a problem hiding this comment.
I've rebased and resolved the new conflicts.
Note that a big part of the reason for using Surfer in the first place is to abstract the build away from the user, so that they don't have to be familiar with the Mozilla build system in order to build Zen. Requiring the user to mess with mozconfig files, for something as basic as CC/CXX, defeats that purpose.
linux/mozconfig: Honor the existing CC and CXX environment variables if set package.json: Invoke cargo(1) through a Python script that honors the CARGO environment variable if set, and pass arguments to ffprefs using the new convention (see below) run_cargo.py: Script to invoke cargo(1), as a workaround for reading an environment variable in a package.json script in a cross-platform manner update_service_dumps.py: Allow specifying DUMPS_FOLDER and ENGINE_DUMPS_FOLDER on the command line ffprefs/src/main.rs: Specify the prefs and engine dirs on the command line instead of hard-coding their locations relative to a common root
This should support
npm run importon Windows. I looked into run-script-os, and a couple other approaches, but then figured it would be simpler to just call a small Python script that looks up the environment variable and callscargo/$CARGOas appropriate.Please give this a try, and let me know if you see any regressions.
package.json: Invokecargo(1)through a Python script that honors theCARGOenvironment variable if set, and pass arguments toffprefsusing the new convention (see below)run_cargo.py: Script to invokecargo(1), as a workaround for reading an environment variable in apackage.jsonscript in a cross-platform mannerupdate_service_dumps.py: Allow specifyingDUMPS_FOLDERandENGINE_DUMPS_FOLDERon the command lineffprefs/src/main.rs: Allow specifying theprefsandenginedirs on the command line instead of hard-coding their locations relative to a common root dir