If there are too many files in .git/refs/heads/, git packs them in
.git/packed-refs. This breaks the build as gen/angle/angle_commit.h
depends on .git/refs/heads/<branch-name>.
With this change, when gn is run and the dependency to this file is set
up, it's unpacked from .git/packed-refs if it's missing from
.git/refs/heads/.
One corner case not solved by this change is if a commit is amended with
no changes and git packs the refs (and so the
.git/refs/heads/<branch-name> file goes away), ninja doesn't rerun gn as
it doesn't believe there to be any changes, yet fails the build as the
dependency is now missing. Running `gn gen` manually fixes the issue.
The issue is automatically fixed when switching branches.
Bug: angleproject:6131
Change-Id: Ie2404e874a5cb3374a652b93faa143acb68eaa19
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3001906
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
In Python 3, you have to be careful to distinguish between
bytes and strings when reading from subprocesses; the code
to read the commit position was failing to do that in one place.
Bug: chromium:1112471
Change-Id: Ifbfba6872f762d7e5d7e356772e93b4a7ee1dfeb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2508746
Commit-Queue: Dirk Pranke <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
commit_id.py was change to try running 'git status' to confirm that git
was present. This caused it to succeed if there was a git checkout
somewhere above ANGLE if ANGLE's .git didn't exist, incorrectly adding
a non-existant .git/HEAD file to the gn rule's inputs.
Always verify that ANGLE's .git/HEAD is present in commit_id.py.
BUG=angleproject:2344
Change-Id: I7e170f39c8d5cef73086ecf6d68925a1d3512de1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2082993
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Brian Osman <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
commit_id_.py is capable of generating the default commit.h.
This makes it so we always take a single path in gn.
Remove the existing commit.h and generate it into the root
generation folder (not the id subfolder) because Android blueprints
can't handle generating into subfolders that don't exist.
Make the <angle_dir> argument capable of taking a filename or
directory name. This allows us to pass the .git/HEAD file which is
a gn input. Android blueprints require all paths used as input
or output to a script are listed as inputs or outputs in the genrule.
BUG=angleproject:2344
Change-Id: I6600083fc400faf07808316c4a6244d6599df79a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2074924
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
commit_id_.py is capable of generating the default commit.h.
This makes it so we always take a single path in gn.
Remove the existing commit.h and generate it into the root
generation folder (not the id subfolder) because Android blueprints
can't handle generating into subfolders that don't exist.
Make the <angle_dir> argument capable of taking a filename or
directory name. This allows us to pass the .git/HEAD file which is
a gn input. Android blueprints require all paths used as input
or output to a script are listed as inputs or outputs in the genrule.
BUG=angleproject:2344
Change-Id: Ifd9c8331f421586db6f2c6e17faf3242376e11d0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2070600
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
gen_angle_gn_info_json.py can be used to generate a json description
of the build for given targets. This information can then be used
to generate build files for other tool chains (e.g. Android blueprint)
Bug: angleproject:2418
Change-Id: Ief8f43e30ae1f469e3fcfa795306675e29a90a2f
Reviewed-on: https://chromium-review.googlesource.com/967225
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
The SPIRV-Tools 'external revision generate' script is coded such that
it assumes a .git folder is present. This causes a problem for the
tarball build. We can fix this by using the same tooling we use for
ANGLE's commit id script to check if the .git directory is present
before running the generator. If it is missing, we insert a hard-coded
dummy header. Also use the 'DEPS' file as a placeholder for .git/HEAD
to check if the current revision needs updating.
Bug: chromium:799620
Bug: angleproject:2237
Change-Id: Icea8e9c66f1600df7dca2aaa45fe449f687f5b55
Reviewed-on: https://chromium-review.googlesource.com/854255
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
This allows us to delete the Windows batch file.
Changes the commit_id script to take the working directory so that it
can be called from a different working directory than the angle
repository is in.
Renames the generated commit header to angle_commit.h. This is being
written to the shared generated code directory for the entire build,
and "commit.h" is insufficiently unique.
BUG=angle:669
Change-Id: I35e80411a7e8ba1e02ce3f6a4fc54ed4dbc918f3
Reviewed-on: https://chromium-review.googlesource.com/202048
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Jamie Madill <[email protected]>