diff options
-rw-r--r-- | compiler/main/DriverPipeline.hs | 5 | ||||
-rw-r--r-- | docs/users_guide/phases.rst | 8 | ||||
-rw-r--r-- | utils/mkUserGuidePart/Options/Linking.hs | 7 |
3 files changed, 8 insertions, 12 deletions
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index eed66b22c1..ad0e0c8c8a 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -2082,10 +2082,7 @@ linkDynLibCheck dflags o_files dep_packages linkStaticLibCheck :: DynFlags -> [String] -> [InstalledUnitId] -> IO () linkStaticLibCheck dflags o_files dep_packages - = do - when (platformOS (targetPlatform dflags) `notElem` [OSiOS, OSDarwin]) $ - throwGhcExceptionIO (ProgramError "Static archive creation only supported on Darwin/OS X/iOS") - linkBinary' True dflags o_files dep_packages + = linkBinary' True dflags o_files dep_packages -- ----------------------------------------------------------------------------- -- Running CPP diff --git a/docs/users_guide/phases.rst b/docs/users_guide/phases.rst index 1efe6a4701..f35ba1b272 100644 --- a/docs/users_guide/phases.rst +++ b/docs/users_guide/phases.rst @@ -539,11 +539,9 @@ for example). .. ghc-flag:: -staticlib - On Darwin/OS X/iOS only, link all passed files into a static library - suitable for linking into an iOS (when using a cross-compiler) or - Mac Xcode project. To control the name, use the :ghc-flag:`-o` ⟨name⟩ option - as usual. The default name is ``liba.a``. This should nearly always - be passed when compiling for iOS with a cross-compiler. + Link all passed files into a static library suitable for linking. + To control the name, use the :ghc-flag:`-o` ⟨name⟩ option + as usual. The default name is ``liba.a``. .. ghc-flag:: -L ⟨dir⟩ diff --git a/utils/mkUserGuidePart/Options/Linking.hs b/utils/mkUserGuidePart/Options/Linking.hs index 9edc7c3fd3..3142020692 100644 --- a/utils/mkUserGuidePart/Options/Linking.hs +++ b/utils/mkUserGuidePart/Options/Linking.hs @@ -11,9 +11,10 @@ linkingOptions = } , flag { flagName = "-staticlib" , flagDescription = - "On Darwin/OS X/iOS only, generate a standalone static library " ++ - "(as opposed to an executable). This is the usual way to " ++ - "compile for iOS." + "Generate a standalone static library (as opposed to an " ++ + "executable). This is useful when cross compiling. The " ++ + "library together with all its dependencies ends up in in a " ++ + "single static library that can be linked against." , flagType = DynamicFlag } , flag { flagName = "-fPIC" |