Skip to content

Commit 9d08d55

Browse files
mganandrajfacebook-github-bot
authored andcommitted
Use NMake generator for Hermes build on Windows (#34790)
Summary: CMake on Windows uses "Visual Studio **" generators are [multi-configuration](https://cgold.readthedocs.io/en/latest/glossary/multi-config.html), which requires the hermes cli and hermes runtime build flavors to be compatible. Using the "MakeFile" generator will avoid the requirement and keeps the gradle script simpler. Please note that the "Makefile" generator is the default when only "Visual Studio Community edition" with default packages is available. Use NMake generator for Hermes build on Windows ## Changelog CMake on Windows uses "Visual Studio **" generators are [multi-configuration](https://cgold.readthedocs.io/en/latest/glossary/multi-config.html), which requires the hermes cli and hermes runtime build flavors to be compatible. Using the "MakeFile" generator will avoid the requirement and keeps the gradle script simpler. Please note that the "Makefile" generator is the default when only "Visual Studio Community edition" with default packages is available. [Android] [Fixed] - Use NMake generator for Hermes build on Windows Pull Request resolved: #34790 Test Plan: Verified that RN build on Windows with multiple SKUs of Visual studio.d Reviewed By: cortinico Differential Revision: D39889332 Pulled By: cortinico fbshipit-source-id: f2d39d981e7c58c8cb93a4322155c844cb6bded3
1 parent 85c0c0f commit 9d08d55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ReactAndroid/hermes-engine/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ task unzipHermes(dependsOn: downloadHermes, type: Copy) {
8686

8787
task configureBuildForHermes(type: Exec) {
8888
workingDir(hermesDir)
89-
commandLine(windowsAwareCommandLine(findCmakePath(cmakeVersion), "-S", ".", "-B", hermesBuildDir.toString(), "-DJSI_DIR=" + jsiDir.absolutePath))
89+
commandLine(windowsAwareCommandLine(findCmakePath(cmakeVersion), Os.isFamily(Os.FAMILY_WINDOWS) ? "-GNMake Makefiles" : "", "-S", ".", "-B", hermesBuildDir.toString(), "-DJSI_DIR=" + jsiDir.absolutePath))
9090
}
9191

9292
task buildHermes(dependsOn: configureBuildForHermes, type: Exec) {

0 commit comments

Comments
 (0)