Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 13ed3f5e authored by Mitch Phillips's avatar Mitch Phillips
Browse files

'm fuzz' shared lib package should be per-fuzzer.

Change the ClusterFuzz package built by 'make fuzz' to now package
shared libraries per-fuzz target.

Changes documented in go/proposed-clusterfuzz-package

This has the impact of:
 - This package is much easier to post-process in the Haiku export
 cronjob.
 - Shared libraries are now per-fuzz-target. This means that we will
 have some level of duplication (libdl, libc, libc++, libclang_rt.*,
 etc.) as these libraries will be in multiple fuzz target's dirs.

This *only* affects the fuzz-$target-$arch.zip file, not the fuzz targets in
$ANDROID_HOST_OUT/fuzz or $ANDROID_PRODUCT_OUT/data/fuzz. These two
install directories still use the global shared libraries in order to
preserve space on devices.

Bug: 144360679
Test: m fuzz
Change-Id: I5f19a13070e01d2d39598f9f215a983b398a9f37
parent 650e8552
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -338,6 +338,9 @@ func (s *fuzzPackager) GenerateBuildActions(ctx android.SingletonContext) {
		collectAllSharedDependencies(module, sharedLibraries, ctx)

		for _, library := range sharedLibraries {
			archDirs[archDir] = append(archDirs[archDir],
				fileToZip{library, ccModule.Name() + "/lib"})

			if _, exists := archSharedLibraryDeps[archAndLibraryKey{archDir, library}]; exists {
				continue
			}
@@ -379,12 +382,6 @@ func (s *fuzzPackager) GenerateBuildActions(ctx android.SingletonContext) {
		}
	})

	// Add the shared library deps for packaging.
	for key, _ := range archSharedLibraryDeps {
		archDirs[key.ArchDir] = append(archDirs[key.ArchDir],
			fileToZip{key.Library, "lib"})
	}

	for archDir, filesToZip := range archDirs {
		arch := archDir.Base()
		hostOrTarget := filepath.Base(filepath.Dir(archDir.String()))