@@ -40,6 +40,7 @@ file a new issue.
40
40
* [ Option 2: Automated install with WinGet] ( #option-2-automated-install-with-winget )
41
41
* [ Option 3: Automated install with Boxstarter] ( #option-3-automated-install-with-boxstarter )
42
42
* [ Building Node.js] ( #building-nodejs-2 )
43
+ * [ Using ccache] ( #using-ccache )
43
44
* [ Android] ( #android )
44
45
* [ ` Intl ` (ECMA-402) support] ( #intl-ecma-402-support )
45
46
* [ Build with full ICU support (all locales supported by ICU)] ( #build-with-full-icu-support-all-locales-supported-by-icu )
@@ -580,42 +581,6 @@ export CC="ccache cc" # add to ~/.zshrc or other shell config file
580
581
export CXX=" ccache c++" # add to ~/.zshrc or other shell config file
581
582
```
582
583
583
- On Windows:
584
-
585
- Follow < https://github.com/ccache/ccache/wiki/MS-Visual-Studio > , and you
586
- should notice that obj file will be bigger than the normal one.
587
-
588
- First, install ccache. Assuming the installation of ccache is in ` c:\ccache `
589
- (where you can find ` ccache.exe ` ), copy ` c:\ccache\ccache.exe ` to ` c:\ccache\cl.exe `
590
- with this command.
591
-
592
- ``` powershell
593
- cp c:\ccache\ccache.exe c:\ccache\cl.exe
594
- ```
595
-
596
- With newer version of Visual Studio, it may need the copy to be ` clang-cl.exe `
597
- instead. If the output of ` vcbuild.bat ` suggestion missing ` clang-cl.exe ` , copy
598
- it differently:
599
-
600
- ``` powershell
601
- cp c:\ccache\ccache.exe c:\ccache\clang-cl.exe
602
- ```
603
-
604
- When building Node.js, provide a path to your ccache via the option:
605
-
606
- ``` powershell
607
- .\vcbuild.bat ccache c:\ccache\
608
- ```
609
-
610
- This will allow for near-instantaneous rebuilds when switching branches back
611
- and forth that were built with cache.
612
-
613
- To use it with ClangCL, run this instead:
614
-
615
- ``` powershell
616
- .\vcbuild.bat clang-cl ccache c:\ccache\
617
- ```
618
-
619
584
##### Loading JS files from disk instead of embedding
620
585
621
586
When modifying only the JS layer in ` lib ` , it is possible to externally load it
@@ -813,6 +778,42 @@ To test if Node.js was built correctly:
813
778
Release\node -e "console.log('Hello from Node.js', process.version)"
814
779
```
815
780
781
+ ##### Using ccache:
782
+
783
+ Follow < https://github.com/ccache/ccache/wiki/MS-Visual-Studio > , and you
784
+ should notice that obj file will be bigger than the normal one.
785
+
786
+ First, install ccache. Assuming the installation of ccache is in ` c:\ccache `
787
+ (where you can find ` ccache.exe ` ), copy ` c:\ccache\ccache.exe ` to ` c:\ccache\cl.exe `
788
+ with this command.
789
+
790
+ ``` powershell
791
+ cp c:\ccache\ccache.exe c:\ccache\cl.exe
792
+ ```
793
+
794
+ With newer version of Visual Studio, it may need the copy to be ` clang-cl.exe `
795
+ instead. If the output of ` vcbuild.bat ` suggestion missing ` clang-cl.exe ` , copy
796
+ it differently:
797
+
798
+ ``` powershell
799
+ cp c:\ccache\ccache.exe c:\ccache\clang-cl.exe
800
+ ```
801
+
802
+ When building Node.js, provide a path to your ccache via the option:
803
+
804
+ ``` powershell
805
+ .\vcbuild.bat ccache c:\ccache\
806
+ ```
807
+
808
+ This will allow for near-instantaneous rebuilds when switching branches back
809
+ and forth that were built with cache.
810
+
811
+ To use it with ClangCL, run this instead:
812
+
813
+ ``` powershell
814
+ .\vcbuild.bat clang-cl ccache c:\ccache\
815
+ ```
816
+
816
817
### Android
817
818
818
819
Android is not a supported platform. Patches to improve the Android build are
0 commit comments