initialize hostFeatureSet from init function

This commit is contained in:
Jing Chen 2021-10-23 15:38:28 -07:00
parent de9090dde9
commit c0dfa0e845
2 changed files with 2 additions and 1 deletions

View File

@ -43,7 +43,7 @@ func HostFeatureSet() *FeatureSet {
return hostFeatureSet
}
var hostFeatureSet = getHostFeatureSet()
var hostFeatureSet *FeatureSet
// ErrIncompatible is returned by FeatureSet.HostCompatible if fs is not a
// subset of the host feature set.

View File

@ -1109,4 +1109,5 @@ func initFeaturesFromString() {
func init() {
initCPUFreq()
initFeaturesFromString()
hostFeatureSet = getHostFeatureSet()
}