Skip to content

Commit

Permalink
iOS: fix ios-configure-glog.sh syntax issue
Browse files Browse the repository at this point in the history
Summary:
A `cat` to file was removed accidentally, preventing the configuration script from executing successfully as part of a `pod install`.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D24024824

fbshipit-source-id: 94af0c6e663320bfac04ee8f6fb37bd4bdc379a4
  • Loading branch information
hramos authored and facebook-github-bot committed Sep 30, 2020
1 parent 8c77f70 commit 7054e58
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scripts/ios-configure-glog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ fi

./configure --host arm-apple-darwin

cat << EOF >> src/config.h
/* Add in so we have Apple Target Conditionals */
#ifdef __APPLE__
#include <TargetConditionals.h>
Expand Down

3 comments on commit 7054e58

@Simek
Copy link
Collaborator

@Simek Simek commented on 7054e58 Sep 30, 2020

Choose a reason for hiding this comment

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

@hramos True, there was a comment, that this line was related to tvOS: 2160377#diff-db5be184065c4ffa44ee6585f41e6a69L33

@hramos
Copy link
Contributor Author

@hramos hramos commented on 7054e58 Sep 30, 2020

Choose a reason for hiding this comment

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

Lines 33 through 48 makeup a single bash multiline command (<< EOF indicates that everything after this line, until EOF, should be passed in to cat as an argument). Without that first component to the command, we have a syntax error in the bash script.

I believe the old comment was referring to these lines in particular which you removed in 2160377#diff-db5be184065c4ffa44ee6585f41e6a69L42-L48:

/* Special configuration for AppleTVOS */
#if TARGET_OS_TV
#undef HAVE_SYSCALL_H
#undef HAVE_SYS_SYSCALL_H
#undef OS_MACOSX
#endif

It's not clear at this moment if the rest of the text that is being appended to src/config.h is still necessary for non-tvOS platforms. After looking at the history of this file, it wasn't very clear if the tvOS fix was limited to the lines you removed, or if the entire script is a tvOS fix. We may need to clean this up later.

@Simek
Copy link
Collaborator

@Simek Simek commented on 7054e58 Sep 30, 2020

Choose a reason for hiding this comment

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

Thank you so much for the detailed explanation! 🙂

Please sign in to comment.