@@ -52,22 +52,35 @@ function buildVcpkgDeps(manifestFolder, vpckgArguments, options)
5252 % Sourcing the .sh file for qcc compilation.
5353 targetEnvRootBat = [' && ' ,append(' source ' ,fullfile(qnxSpRoot ,qnxVersion ,' qnxsdp-env.sh' ))];
5454 end
55- elseif contains(targetTriplet , ' x64-speedgoat-linux' , ' IgnoreCase' , true )
55+ elseif contains(targetTriplet , ' speedgoat-linux' , ' IgnoreCase' , true )
56+ if contains(targetTriplet , ' x64' , ' IgnoreCase' , true )
57+ arch = ' x64' ;
58+ elseif contains(targetTriplet , ' arm64' , ' IgnoreCase' , true )
59+ arch = ' aarch64' ;
60+ end
61+
5662 % Yocto cc specific implementation
5763 try
5864 hwConfigObj = slrealtime .internal .HardwareConfig .getHWConfigObject();
59- x64CCPath = hwConfigObj .getToolchainPath(' x64 ' );
65+ CCPath = hwConfigObj .getToolchainPath(arch );
6066 catch ME
6167 error(message(' slrealtime:utils:toolChainError' , ME .message ));
6268 end
6369
64- if isempty(x64CCPath )
65- % Error x64 cc root path not defined.
66- error(message(' slrealtime:utils:x64CCRootNotSet' ));
70+ if isempty(CCPath )
71+ if strcmp(arch ,' x64' )
72+ error(message(' slrealtime:utils:x64CCRootNotSet' ));
73+ elseif strcmp(arch ,' aarch64' )
74+ error(message(' slrealtime:utils:armCCRootNotSet' ));
75+ else
76+ error(' Compiler toolchain root not set.' );
77+ end
6778 end
6879
6980 if ispc
70- targetEnvRootBat = [' && ' ,fullfile(x64CCPath ,' x64cc-setup-env.bat' )];
81+ targetEnvRootBat = [' && ' ,fullfile(CCPath ,sprintf(' %s cc-setup-env.bat' ,arch ))];
82+ elseif isunix && ~ismac
83+ targetEnvRootBat = [' && ' ,append(' source ' ,fullfile(CCPath ,sprintf(' %s cc-setup-env.sh' ,arch )))];
7184 else
7285 error(' Current host OS is still not supported.' );
7386 end
0 commit comments