build: Fix incorrect target_os -> target_arch check
#4550
Merged
target_os -> target_arch check
#4550