hermes-windows/lib
Igor Ianishevskyi 645b08e574 Detect host platform instead of target for InternalBytecode Cmake (#527)
Summary:
There is a switch for choosing the right concatinator for concating js file together
in `lib/InternalBytecode/CMakeLists.txt`. When crosscompiling (eg compiling Android on Windows)
it chooses the target platform (not WIN32) despite being launched on Windows.
CMAKE_HOST_WIN32 var is suggested to be used instead to make the proper detection.

Pull Request resolved: https://github.com/facebook/hermes/pull/527

Test Plan:
Environment: Win10, Powershell
1. cd one folder up from hermes repo
2. Configure host build `python3 hermes/utils/build/configure.py --build-system='Visual Studio 15 2017' ./build`
3. Run the host build `MSBuild.exe ALL_BUILD.vcxproj /p:Configuration=Debug`
4. Set HERMES_WS_DIR:  `$env:HERMES_WS_DIR=<path to build foder>`
5. `cd hermes\android; ./gradlew assembleNoIntl`
6. Actual result: the following error
```
FAILED: cmd.exe /C "cd /D [..]hermes\lib\InternalBytecode && cat [..]\hermes\lib\InternalBytecode\00-header.js [..]hermes\lib\InternalBytecode\01-Promise.js [..]hermes\lib\InternalBytecode\02-AsyncFn.js [..]hermes\lib\InternalBytecode\99-footer.js > [..]staging/hermes/cmake/nointlDebug/armeabi-v7a/lib/InternalBytecode/InternalBytecode.js"
  'cat' is not recognized as an internal or external command,
  ```
7. Expected result: BUILD SUCCESSFUL

Reviewed By: neildhar

Differential Revision: D29005361

Pulled By: Huxpro

fbshipit-source-id: 5ead4c1c4869f076db20c0ea9c6bb2fa775ae8b5
2021-06-09 14:55:42 -07:00
..
ADT Use internal fork of LLVM 2020-02-06 00:34:00 -08:00
AST Parse import assertions 2021-05-07 10:12:38 -07:00
AST2JS EASY: printChild() should skip null nodes 2020-12-10 15:51:21 -08:00
BCGen Allow cpp files to be combined for unity builds 2021-04-07 17:57:59 -07:00
CompilerDriver Set up TS parsing config. 2021-05-07 10:12:38 -07:00
ConsoleHost Perform microtask checkpoints in ConsoleHost & REPL 2021-04-22 13:29:04 -07:00
DependencyExtractor Use std::make_unique (#458) 2021-02-23 19:51:53 -08:00
FlowParser Allow cpp files to be combined for unity builds 2021-04-07 17:57:59 -07:00
FrontEndDefs Extend Builtins with JSFunction and register 2021-01-25 15:21:44 -08:00
IR Allow cpp files to be combined for unity builds 2021-04-07 17:57:59 -07:00
IRGen Apply clang-format 2021-05-20 21:23:40 -07:00
Inst rename LLVM to LLVH 2020-07-01 04:39:48 -07:00
InternalBytecode Detect host platform instead of target for InternalBytecode Cmake (#527) 2021-06-09 14:55:42 -07:00
Optimizer Allow cpp files to be combined for unity builds 2021-04-07 17:57:59 -07:00
Parser Fix lexing of ?? in type annotations. 2021-05-20 13:22:57 -07:00
Platform Revert D28977675: Fix destruction of Intl Collator and DateTimeFormat 2021-06-09 11:29:22 -07:00
Regex Enforce error handling in Regex Executor 2021-02-11 17:19:15 -08:00
SourceMap Use std::make_unique (#458) 2021-02-23 19:51:53 -08:00
Support Disable range loop analysis warnings 2021-04-05 13:54:10 -07:00
Utils new IR GetBuiltinClosureInst 2021-01-25 15:21:44 -08:00
VM Fix indexOf/lastIndexOf not early return on 0-len array. 2021-06-09 13:50:21 -07:00
CMakeLists.txt Link hermesFrontend against hermesParser 2021-04-05 14:29:47 -07:00