From a4796d5b851dac4a546f89c282f65e320076eb10 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 27 Aug 2016 09:53:30 +0200 Subject: Clean up library export, make c and cxx modules project root only So now c and cxx modules can only be loaded in project root scope (normally root.build). Also, the c.std and cxx.std must now be set *before* loading the module to take effect. This means we won't be able to handle old buildfiles anymore but old versions of build2 should be able to handle new *.std placement. --- build2/cc/link | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) (limited to 'build2/cc/link') diff --git a/build2/cc/link b/build2/cc/link index 474c299..09678c2 100644 --- a/build2/cc/link +++ b/build2/cc/link @@ -40,7 +40,8 @@ namespace build2 friend class compile; void - process_libraries (file&, + process_libraries (const dir_paths&, + file&, bool, bool, const function&, @@ -55,21 +56,14 @@ namespace build2 hash_libraries (sha256&, file&, bool) const; file& - resolve_library (name, scope&, lorder, optional&) const; - - // Extract system library search paths from GCC or compatible (Clang, - // Intel) using the -print-search-dirs option. - // - void - gcc_library_search_paths (scope&, dir_paths&) const; - - // Extract system library search paths from VC (msvc.cxx). - // - void - msvc_library_search_paths (scope&, dir_paths&) const; + resolve_library (name, + scope&, + lorder, + const dir_paths&, + optional&) const; dir_paths - extract_library_paths (scope&) const; + extract_library_dirs (scope&) const; bool pkgconfig_extract (scope&, @@ -77,7 +71,7 @@ namespace build2 const string*, const string&, const dir_path&, - optional&, + const dir_paths&, lorder) const; // Alternative search logic for VC (msvc.cxx). @@ -93,20 +87,20 @@ namespace build2 const prerequisite_key&) const; target* - search_library (optional& spc, + search_library (const dir_paths& sysd, + optional& usrd, prerequisite& p, lorder lo) const { if (p.target == nullptr) // First check the cache. - p.target = search_library (spc, p.key (), lo); + p.target = search_library (sysd, usrd, p.key (), lo); return p.target; } - // Note that pk's scope should not be NULL (even if dir is absolute). - // target* - search_library (optional&, + search_library (const dir_paths&, + optional&, const prerequisite_key&, lorder) const; -- cgit v1.1