Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set Mac OS X deployment target #51

Closed
ollydev opened this issue Sep 10, 2020 · 13 comments
Closed

Set Mac OS X deployment target #51

ollydev opened this issue Sep 10, 2020 · 13 comments
Labels
question Further information is requested

Comments

@ollydev
Copy link

ollydev commented Sep 10, 2020

Would it be possible to get an option to set MacOS target? I believe currently anything built with SW only runs on the latest macos version.

I think the option for apple clang is:
-mmacosx-version-min=<value> Set Mac OS X deployment target

Thanks

@ollydev ollydev added the question Further information is requested label Sep 10, 2020
@egorpugin
Copy link
Contributor

egorpugin commented Sep 10, 2020

Do you mean programs built by sw or sw binary itself?

@ollydev
Copy link
Author

ollydev commented Sep 10, 2020

Programs built by SW. It would be similar to how the win-mt flag is done, just passing a extra option to the compiler?

@egorpugin
Copy link
Contributor

There is no such flag at the moment.
There is -os flag. Probably we could support version there.
Like -os macos-10.14. What do you think? Is it understandable for you, other users?

@ollydev
Copy link
Author

ollydev commented Sep 10, 2020

That would be perfect.

@ollydev
Copy link
Author

ollydev commented Sep 10, 2020

It's the following in cmake:
SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.13" CACHE STRING "Minimum OS X deployment version" FORCE)

@egorpugin
Copy link
Contributor

egorpugin commented Sep 10, 2020

Yes, but we also need or be able to control:

  1. win sdk version
  2. linux kernel version

...using some uniform syntax.
-os looks good to me too.

@ollydev
Copy link
Author

ollydev commented Sep 13, 2020

I'm not sure other OS really apply to this. There doesn't exists flags for the other compilers (gcc, cl.exe) if you want a different kernel/sdk. You have to reinstall.

If this is correct maybe a new flag like -macos-version 10.13 would be more sufficient.

@egorpugin
Copy link
Contributor

There doesn't exists flags for the other compilers (gcc, cl.exe) if you want a different kernel/sdk.

Yes, but sw will handle this in different ways for different OSes. For example, for windows it will set specific sdk version dependency. For linux - something else. (Maybe syscall list or linux kernel headers version.)

@egorpugin
Copy link
Contributor

ac72295
You can try it on macos.
Pass -os macos-10.13 or other version.
Even -os macos-10.14,macos-10.15.
Add -trace to see commands as is to check for command line flag there.

@ollydev
Copy link
Author

ollydev commented Sep 15, 2020

Everything apart from macOS is broken if you're not aware:
https://github.com/SoftwareNetwork/sw/runs/1115062720

Downloading database from origin remote
/home/runner/work/_temp/d9e4c3d7-5f74-4f9d-b4cb-71ec6ed09d87.sh: line 1:  4266 Segmentation fault      (core dumped) ./sw -static build

@egorpugin
Copy link
Contributor

Yes, I see.
Cannot repro yet.

@ollydev
Copy link
Author

ollydev commented Sep 15, 2020

-os macos-10.13 worked well. Thanks! 😄

@egorpugin
Copy link
Contributor

Feel free to report any other issues or feature requests!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants