Skip to content

Commit

Permalink
(#5696) fix FFI cross compilation.
Browse files Browse the repository at this point in the history
* fix FFI cross compilation.

* fix misisng user_info_build for native build

* minor code readability improvement

* follow idiomatic usage of user_info_build
  • Loading branch information
PengZheng authored Jun 7, 2021
1 parent 66e8222 commit cc94a08
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions recipes/libffi/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,15 @@ def _configure_autotools(self):
self._autotools.configure(args=config_args, configure_dir=self._source_subfolder, build=build, host=host)
return self._autotools

@property
def _user_info_build(self):
return getattr(self, "user_info_build", None) or self.deps_user_info

def build(self):
self._patch_sources()
shutil.copy(self.deps_user_info["gnu-config"].CONFIG_SUB,
shutil.copy(self._user_info_build["gnu-config"].CONFIG_SUB,
os.path.join(self._source_subfolder, "config.sub"))
shutil.copy(self.deps_user_info["gnu-config"].CONFIG_GUESS,
shutil.copy(self._user_info_build["gnu-config"].CONFIG_GUESS,
os.path.join(self._source_subfolder, "config.guess"))

with self._build_context():
Expand Down

0 comments on commit cc94a08

Please sign in to comment.