@@ -64,6 +64,19 @@ def is_sdk_path_source(sdk_dir):
64
64
# should work for our purpose.
65
65
return os .path .exists (os .path .join (sdk_dir , 'build_tools' ))
66
66
67
+ def validate_prebuilt_args (arch , config ):
68
+ """Validate cmd line args for build with prebuilt libraries"""
69
+ # Some options are not available when using prebuilt libraries"""
70
+ if platform .system () == 'Darwin' :
71
+ if arch == 'x86' or config == 'Debug' :
72
+ raise ValueError ("Prebuilt mac firebase libraries are built for x64 and Release mode only. "
73
+ "Please fix the command line arguments and try again" )
74
+
75
+ if platform .system () == 'Linux' :
76
+ if config == 'Debug' :
77
+ raise ValueError ("Prebuilt linux firebase libraries are built with Release mode only. "
78
+ "Please fix the --config command line argument and try again." )
79
+
67
80
def get_vcpkg_triplet (arch , msvc_runtime_library = 'static' ):
68
81
""" Get vcpkg target triplet (platform definition).
69
82
@@ -240,6 +253,7 @@ def main():
240
253
build_app_with_source (args .app_dir , args .sdk_dir , args .build_dir , args .arch ,
241
254
args .msvc_runtime_library , args .config , args .target_format )
242
255
else :
256
+ validate_prebuilt_args (args .arch , args .config )
243
257
print ("SDK path provided is Firebase C++ prebuilt libraries. Building..." )
244
258
build_app_with_prebuilt (args .app_dir , args .sdk_dir , args .build_dir , args .arch ,
245
259
args .msvc_runtime_library , args .config )
0 commit comments