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

Commit 4f664e91 authored by Yi Kong's avatar Yi Kong
Browse files

[bindgen] Allow unrecognised -Wno-* flags on LLVM_NEXT

Test: LLVM_NEXT=true m
Bug: 236798112
Change-Id: I5d1625a30d7271c94cba71347f17fbcb0b87f4ae
parent b79fc584
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -239,6 +239,11 @@ func (b *bindgenDecorator) GenerateSource(ctx ModuleContext, deps PathDeps) andr
		cflags = append(cflags, "-x c")
	}

	// LLVM_NEXT may contain flags that bindgen doesn't recognise. Turn off unknown flags warning.
	if ctx.Config().IsEnvTrue("LLVM_NEXT") {
		cflags = append(cflags, "-Wno-unknown-warning-option")
	}

	outputFile := android.PathForModuleOut(ctx, b.BaseSourceProvider.getStem(ctx)+".rs")

	var cmd, cmdDesc string