riscv64: Add support for RISC-V
[platform/upstream/iotivity.git] / build_common / SConscript
index 9ca277d..4bed93b 100755 (executable)
@@ -19,7 +19,7 @@ host_target_map = {
 # Map of os and allowed archs (os: allowed archs)
 os_arch_map = {
                'linux': ['x86', 'x86_64', 'arm', 'arm-v7a', 'armeabi-v7a', 'arm64'],
-               'tizen': ['x86', 'x86_64', 'arm', 'arm-v7a', 'armeabi-v7a', 'arm64'],
+               'tizen': ['x86', 'x86_64', 'arm', 'arm-v7a', 'armeabi-v7a', 'arm64', 'riscv64'],
                'android': ['x86', 'x86_64', 'armeabi', 'armeabi-v7a', 'armeabi-v7a-hard', 'arm64-v8a'],
                'windows': ['x86', 'amd64', 'arm'],
                'msys_nt':['x86', 'x86_64'],
@@ -140,6 +140,7 @@ help_vars.Add(EnumVariable('PLATFORM_TLS', 'Use platform tls instead of local mb
 help_vars.Add(EnumVariable('OIC_SUPPORT_TIZEN_TRACE', 'Tizen Trace(T-trace) api availability', 'False', allowed_values=('True', 'False')))
 help_vars.Add(BoolVariable('WITH_PROCESS_EVENT','Build including process event logics in ocstack', 'False'))
 help_vars.Add(BoolVariable('DISABLE_AUTO_TCP_NSPROVIDER_DISCOVERY', 'Disable auto-discovery of NSProvider over TCP for TCP connected events', False))
+help_vars.Add(BoolVariable('ENABLE_DUP','Enable duplicate IPv4/IPv6 packets', 'False'))
 AddOption('--prefix',
                   dest='prefix',
                   type='string',
@@ -170,6 +171,17 @@ else:
                        PREFIX = GetOption('prefix'),
                        LIB_INSTALL_DIR = ARGUMENTS.get('LIB_INSTALL_DIR') #for 64bit build
                        )
+
+targets_support_gcov = ['linux', 'darwin']
+if target_os in targets_support_gcov:
+    # Build option to enable coverage checking using gcov.
+    # Requires gcc or clang family compilers.
+    # Actual compiler flags need to be set in target-specific script.
+    help_vars.Add(
+        BoolVariable('COVERAGE_CHECKS',
+                     'Build support for running code coverage checks',
+                      default=False))
+
 Help(help_vars.GenerateHelpText(env))
 
 tc_set_msg = '''
@@ -374,6 +386,9 @@ if env.get('WITH_PROCESS_EVENT'):
 if env.get('DISABLE_AUTO_TCP_NSPROVIDER_DISCOVERY'):
        env.AppendUnique(CPPDEFINES = ['DISABLE_AUTO_TCP_NSPROVIDER_DISCOVERY'])
 
+if env.get('ENABLE_DUP'):
+        env.AppendUnique(CPPDEFINES = ['ENABLE_DUP'])
+
 libs = []
 if env.get('SECURED') == '1':
     defines.append('-D__WITH_DTLS__=1')