Skip to content

CMake DSO build system improvements#2610

Closed
tstarling wants to merge 3 commits into
facebook:masterfrom
tstarling:ezc-so
Closed

CMake DSO build system improvements#2610
tstarling wants to merge 3 commits into
facebook:masterfrom
tstarling:ezc-so

Conversation

@tstarling
Copy link
Copy Markdown
Contributor

The first commit is a duplicate of #2608.

Allow dynamically loadable Zend compat extensions

  • Use the existing macro ZEND_GET_MODULE() to provide the necessary getModule() function.
  • In CMake, add macro HHVM_COMPAT_EXTENSION(), equivalent to HHVM_EXTENSION(), which will register a zend-compat extension.
  • Set the source language, so that it's not even necessary to rename the files. This makes it trivial to have a dual-targeted source tree.

Don't require full source tree for building DSOs:

  • Install header files
  • Install CMake files needed by hphpize
  • Fix hphpize to look for headers and CMake files in the installed directory
  • Rename php_config.h-linux to php_config-linux.h and php_config.h-darwin to php_config-darwin.h, so that it will be picked up by *.h glob for installation. Also helps with syntax highlighting.

Also:

  • Add an install target to the makefile of DSOs. Install to a version-dependent directory, similar to what PHP does. I chose lib/hphp over lib/hhvm for consistency with include/hphp.

@tstarling
Copy link
Copy Markdown
Contributor Author

Rebased on top of updated #2608.

tstarling added 2 commits May 9, 2014 08:44
Applied a two-space indent. It was a mixture of 2, 3, 4 and 8 space
indents and tabs; I don't know how you could look at it without going
crazy. I mostly used Vim's "=" command, even in cases where its output
is potentially controversial, because at least it's consistent.

Also modified vertical whitespace in a couple of places. A
whitespace-insensitive diff will show you where.

Fixed DOS line endings in FindBISON.cmake, which were reported by git as
whitespace errors.
* Use the existing macro ZEND_GET_MODULE() to provide the necessary
  getModule() function.
* In CMake, add macro HHVM_COMPAT_EXTENSION(), equivalent to
  HHVM_EXTENSION(), which will register a zend-compat extension.
* Set the source language, so that it's not even necessary to rename the
  files. This makes it trivial to have a dual-targeted source tree.
@tstarling tstarling changed the title EZC: allow dynamically loadable Zend compat extensions CMake DSO build system improvements May 8, 2014
@tstarling
Copy link
Copy Markdown
Contributor Author

Added more DSO-related work on to this PR.

@tstarling
Copy link
Copy Markdown
Contributor Author

The associated third-party commit hhvm/hhvm-third-party#3 should be merged after this one.

@JoelMarcey JoelMarcey added this to the Lockdown milestone May 12, 2014
@reeze
Copy link
Copy Markdown
Contributor

reeze commented May 13, 2014

+1

* Install header files
* Install CMake files needed by hphpize
* Fix hphpize to look for headers and CMake files in the installed
  directory
* Rename php_config.h-linux to php_config-linux.h and
  php_config.h-darwin to php_config-darwin.h, so that it will be
  picked up by *.h glob for installation. Also helps with syntax
  highlighting.

Also:
* Add an install target to the makefile of DSOs. Install to a
  version-dependent directory, similar to what PHP does. I chose
  lib/hphp over lib/hhvm for consistency with include/hphp.
@tstarling
Copy link
Copy Markdown
Contributor Author

Amended to fix missing file hphpize.in

@JoelMarcey
Copy link
Copy Markdown
Contributor

@tstarling Hi. I pulled this in for review. I had to do some manual pulling since the patch didn't cleanly apply, even with some tweaking.

Internal diff number: D1330392

wmfgerrit pushed a commit to wikimedia/mediawiki-php-luasandbox that referenced this pull request May 15, 2014
Requires facebook/hhvm#2610 . Makes it possible
to create a luasandbox.so with "hphpize && cmake . && make".

Change-Id: I6d86adbc32fdd352b1fb0654bd246b4681465cdc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants