Commit 2c5babf2 by Victor M. Alvarez

Add argument for enabling "dex" module.

parent aadfd49a
......@@ -130,6 +130,7 @@ class BuildExtCommand(build_ext):
('enable_magic', 'enable_magic'),
('enable_cuckoo', 'enable_cuckoo'),
('enable_dotnet', 'enable_dotnet'),
('enable_dex', 'enable_dex'),
('enable_profiling', 'enable_profiling'))
if self.enable_magic and self.dynamic_linking:
......@@ -141,6 +142,9 @@ class BuildExtCommand(build_ext):
if self.enable_dotnet and self.dynamic_linking:
raise distutils.errors.DistutilsOptionError(
'--enable-dotnet can''t be used with --dynamic-linking')
if self.enable_dex and self.dynamic_linking:
raise distutils.errors.DistutilsOptionError(
'--enable-dex can''t be used with --dynamic-linking')
def run(self):
"""Execute the build command."""
......@@ -236,6 +240,11 @@ class BuildExtCommand(build_ext):
else:
exclusions.append('yara/libyara/modules/dotnet.c')
if self.enable_dex:
module.define_macros.append(('DEX_MODULE', '1'))
else:
exclusions.append('yara/libyara/modules/dex.c')
exclusions = [os.path.normpath(x) for x in exclusions]
for directory, _, files in os.walk('yara/libyara/'):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment