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

Don't clobber CXXFLAGS/CMAKE_CXX_FLAGS #692

Closed
wants to merge 1 commit into from

Conversation

strager
Copy link
Contributor

@strager strager commented Mar 31, 2019

CMake allows the user to add additional compilation options using CXXFLAGS= or -DCMAKE_CXX_FLAGS=. For example, each of the following commands would enable GCC security features in generated code:

$ CXXFLAGS=-fstack-protector-strong cmake .
$ cmake -DCMAKE_CXX_FLAGS=-fstack-protector-strong .

Unfortunately, this doesn't work with Watchman's build system; CXXFLAGS and CMAKE_CXX_FLAGS are ignored. This makes it harder for package managers to tweak Watchman's compilation.

Teach Watchman to respect user-supplied compiler flags instead of overriding them.

CMake allows the user to add additional compilation options using
CXXFLAGS= or -DCMAKE_CXX_FLAGS=. For example, each of the following
commands would enable GCC security features in generated code:

    $ CXXFLAGS=-fstack-protector-strong cmake .
    $ cmake -DCMAKE_CXX_FLAGS=-fstack-protector-strong .

Unfortunately, this doesn't work with Watchman's build system; CXXFLAGS
and CMAKE_CXX_FLAGS are ignored. This makes it harder for package
managers to tweak Watchman's compilation.

Teach Watchman to respect user-supplied compiler flags instead of
overriding them.
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wez is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@wez merged this pull request in 2e8c39e.

facebook-github-bot pushed a commit that referenced this pull request Nov 2, 2019
Summary:
Bumps [ffi](https://github.com/ffi/ffi) from 1.9.18 to 1.11.1.
<details>
<summary>Changelog</summary>

*Sourced from [ffi's changelog](https://github.com/ffi/ffi/blob/master/CHANGELOG.md).*

> 1.11.1 / 2019-05-20
> -------------------
>
> Changed:
> * Raise required ruby version to >=2.0. [#699, [#700
> * Fix a possible linker error on ruby < 2.3 on Linux.
>
>
> 1.11.0 / 2019-05-17
> -------------------
> This version was yanked on 2019-05-20 to fix an install issue on ruby-1.9.3. [#700
>
> Added:
> * Add ability to disable or force use of system libffi. [#669
>   Use like `gem inst ffi -- --enable-system-libffi` .
> * Add ability to call FFI callbacks from outside of FFI call frame. [#584
> * Add proper documentation to FFI::Generator and ::Task
> * Add gemspec metadata. [#696, [#698
>
> Changed:
> * Fix stdcall on Win32. [#649, [#669
> * Fix load paths for FFI::Generator::Task
> * Fix FFI::Pointer#read_string(0) to return a binary String. [#692
> * Fix benchmark suite so that it runs on ruby-2.x
> * Move FFI::Platform::CPU from C to Ruby. [#663
> * Move FFI::StructByReference to Ruby. [#681
> * Move FFI::DataConverter to Ruby ([#661)
> * Various cleanups and improvements of specs and benchmarks
>
> Removed:
> * Remove ruby-1.8 and 1.9 compatibility code. [#683
> * Remove unused spec files. [#684
>
>
> 1.10.0 / 2019-01-06
> -------------------
>
> Added:
> * Add /opt/local/lib/ to ffi's fallback library search path. [#638
> * Add binary gem support for ruby-2.6 on Windows
> * Add FreeBSD on AArch64 and ARM support. [#644
> * Add FFI::LastError.winapi_error on Windows native or Cygwin. [#633
>
> Changed:
> * Update to rake-compiler-dock-0.7.0
> * Use 64-bit inodes on FreeBSD >= 12. [#644
> * Switch time_t and suseconds_t types to long on FreeBSD. [#627
> * Make register_t long_long on 64-bit FreeBSD. [#644
> * Fix Pointer#write_array_of_type [#637
>
></tr></table> ... (truncated)
</details>
<details>
<summary>Commits</summary>

- [`3d8c91c`](ffi/ffi@3d8c91c) Update CHANGELOG for ffi-1.11.1
- [`2a3d9d6`](ffi/ffi@2a3d9d6) Bump VERSION to 1.11.1
- [`19d5776`](ffi/ffi@19d5776) Add some missing items to CHANGELOG for ffi-1.11.0
- [`08b9b78`](ffi/ffi@08b9b78) Raise ruby version requirement to >=2.0
- [`e76c43b`](ffi/ffi@e76c43b) Fix build on ruby-2.0 on Linux
- [`9b4a9e4`](ffi/ffi@9b4a9e4) Add version 1.11.0 to CHANGELOG
- [`36f1bb5`](ffi/ffi@36f1bb5) Bump VERSION to 1.11.0
- [`29c07a9`](ffi/ffi@29c07a9) Pass options from rake task to the FFI::Generator
- [`7efdd2e`](ffi/ffi@7efdd2e) Include the name of the template file instead of just rake
- [`bc99b7e`](ffi/ffi@bc99b7e) Add proper documentation to FFI::Generator and ::Task
- Additional commits viewable in [compare view](ffi/ffi@1.9.18...1.11.1)
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ffi&package-manager=bundler&previous-version=1.9.18&new-version=1.11.1)](https://help.github.com/articles/configuring-automated-security-fixes)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebook/watchman/network/alerts).

</details>
Pull Request resolved: #759

Differential Revision: D18285622

Pulled By: wez

fbshipit-source-id: bff26e77b99faaed6a47716a25400e3efd622fdc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants