Skip to content

Commit

Permalink
remove some more copy calls until pantsbuild#6269 is merged
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmicexplorer committed Jul 29, 2018
1 parent b019032 commit a9c61a7
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions src/python/pants/backend/native/config/environment.py
Expand Up @@ -125,11 +125,18 @@ class Linker(datatype([
@property
def with_tupled_collections(self):
"""???"""
return self.copy(
# FIXME: convert these to using `copy()` when #6269 is merged.
return Linker(
path_entries=tuple(self.path_entries),
exe_filename=self.exe_filename,
runtime_library_dirs=tuple(self.runtime_library_dirs),
linking_library_dirs=tuple(self.linking_library_dirs),
extra_args=tuple(self.extra_args))
# return self.copy(
# path_entries=tuple(self.path_entries),
# runtime_library_dirs=tuple(self.runtime_library_dirs),
# linking_library_dirs=tuple(self.linking_library_dirs),
# extra_args=tuple(self.extra_args))


class CompilerMixin(Executable):
Expand Down Expand Up @@ -167,11 +174,18 @@ def as_invocation_environment_dict(self):
@property
def with_tupled_collections(self):
"""???"""
return self.copy(
# FIXME: convert these to using `copy()` when #6269 is merged.
return CCompiler(
path_entries=tuple(self.path_entries),
exe_filename=self.exe_filename,
runtime_library_dirs=tuple(self.runtime_library_dirs),
include_dirs=tuple(self.include_dirs),
extra_args=tuple(self.extra_args))
# return self.copy(
# path_entries=tuple(self.path_entries),
# runtime_library_dirs=tuple(self.runtime_library_dirs),
# include_dirs=tuple(self.include_dirs),
# extra_args=tuple(self.extra_args))


class CppCompiler(datatype([
Expand All @@ -193,11 +207,18 @@ def as_invocation_environment_dict(self):
@property
def with_tupled_collections(self):
"""???"""
return self.copy(
# FIXME: convert these to using `copy()` when #6269 is merged.
return CppCompiler(
path_entries=tuple(self.path_entries),
exe_filename=self.exe_filename,
runtime_library_dirs=tuple(self.runtime_library_dirs),
include_dirs=tuple(self.include_dirs),
extra_args=tuple(self.extra_args))
# return self.copy(
# path_entries=tuple(self.path_entries),
# runtime_library_dirs=tuple(self.runtime_library_dirs),
# include_dirs=tuple(self.include_dirs),
# extra_args=tuple(self.extra_args))


# NB: These wrapper classes for LLVM and GCC toolchains are performing the work of variants. A
Expand Down

0 comments on commit a9c61a7

Please sign in to comment.