@@ -105,6 +105,12 @@ function getPreferredCuda(os) {
105105
106106// Disable compute platform not supported on OS
107107function disableUnsupportedPlatforms ( os ) {
108+
109+ if ( opts . ptbuild == "preview" )
110+ archMap = version_map . nightly
111+ else
112+ archMap = version_map . release
113+
108114 for ( const [ arch_key , info ] of archInfoMap ) {
109115 var elems = document . querySelectorAll ( '[id^="' + arch_key + '"]' ) ;
110116 if ( elems == null ) {
@@ -114,6 +120,11 @@ function disableUnsupportedPlatforms(os) {
114120 for ( var i = 0 ; i < elems . length ; i ++ ) {
115121 var supported = info . platforms . has ( os ) ;
116122 elems [ i ] . style . textDecoration = supported ? "" : "line-through" ;
123+
124+ // Officially supported arch but not available
125+ if ( ! archMap [ elems [ i ] . id ] ) {
126+ elems [ i ] . style . textDecoration = "line-through" ;
127+ }
117128 }
118129 }
119130}
@@ -129,7 +140,12 @@ function changeVersion(ptbuild) {
129140 for ( const [ arch_key , info ] of archInfoMap ) {
130141 var elems = document . querySelectorAll ( '[id^="' + arch_key + '"]' ) ;
131142 for ( var i = 0 ; i < elems . length ; i ++ ) {
132- elems [ i ] . children [ 0 ] . textContent = info . title + " " + archMap [ elems [ i ] . id ] [ 1 ]
143+ if ( archMap [ elems [ i ] . id ] ) {
144+ elems [ i ] . style . textDecoration = "" ;
145+ elems [ i ] . children [ 0 ] . textContent = info . title + " " + archMap [ elems [ i ] . id ] [ 1 ]
146+ } else {
147+ elems [ i ] . style . textDecoration = "line-through" ;
148+ }
133149 }
134150 }
135151 var stable_element = document . getElementById ( "stable" ) ;
@@ -190,6 +206,8 @@ function selectedOption(option, selection, category) {
190206 }
191207 } else if ( category == "ptbuild" ) {
192208 changeVersion ( opts . ptbuild ) ;
209+ //make sure unsupported platforms are disabled
210+ disableUnsupportedPlatforms ( opts . os ) ;
193211 }
194212 commandMessage ( buildMatcher ( ) ) ;
195213 if ( category === "os" ) {
0 commit comments