diff --git a/src/main/java/com/google/devtools/build/lib/bazel/repository/LocalConfigPlatformFunction.java b/src/main/java/com/google/devtools/build/lib/bazel/repository/LocalConfigPlatformFunction.java index 7f188bffb75706..eecf41a30ecd59 100644 --- a/src/main/java/com/google/devtools/build/lib/bazel/repository/LocalConfigPlatformFunction.java +++ b/src/main/java/com/google/devtools/build/lib/bazel/repository/LocalConfigPlatformFunction.java @@ -175,7 +175,11 @@ private static String buildFileContent(String repositoryName) { "platform(name = 'host',", " # Auto-detected host platform constraints.", " constraint_values = HOST_CONSTRAINTS,", - ")"), + ")", + "exports_files([", + " # Export constraints.bzl for use in downstream bzl_library targets.", + " 'constraints.bzl',", + "])"), repositoryName); }