@@ -1597,13 +1597,27 @@ export class DefaultClient implements Client {
15971597 debug : { command : serverModule , args : [ serverName ] , options : { detached : true } }
15981598 } ;
15991599
1600+ // The IntelliSense process should automatically detect when AutoPCH is
1601+ // not supportable (on platforms that don't support disabling ASLR/PIE).
1602+ // We've had reports of issues on arm64 macOS that are addressed by
1603+ // disabling the IntelliSense cache, suggesting fallback does not
1604+ // always work as expected. It's actually more efficient to disable
1605+ // the cache on platforms we know do not support it. We do that here.
16001606 let intelliSenseCacheDisabled : boolean = false ;
16011607 if ( os . platform ( ) === "darwin" ) {
1602- const releaseParts : string [ ] = os . release ( ) . split ( "." ) ;
1603- if ( releaseParts . length >= 1 ) {
1604- // AutoPCH doesn't work for older Mac OS's.
1605- intelliSenseCacheDisabled = parseInt ( releaseParts [ 0 ] ) < 17 ;
1608+ // AutoPCH doesn't work for arm64 macOS.
1609+ if ( os . arch ( ) === "arm64" ) {
1610+ intelliSenseCacheDisabled = true ;
1611+ } else {
1612+ // AutoPCH doesn't work for older x64 macOS's.
1613+ const releaseParts : string [ ] = os . release ( ) . split ( "." ) ;
1614+ if ( releaseParts . length >= 1 ) {
1615+ intelliSenseCacheDisabled = parseInt ( releaseParts [ 0 ] ) < 17 ;
1616+ }
16061617 }
1618+ } else {
1619+ // AutoPCH doesn't work for arm64 Windows.
1620+ intelliSenseCacheDisabled = os . platform ( ) === "win32" && os . arch ( ) === "arm64" ;
16071621 }
16081622
16091623 const localizedStrings : string [ ] = [ ] ;
0 commit comments