Ticket #62208: patch-python-respect-cc-variable.diff

File patch-python-respect-cc-variable.diff, 1.0 KB (added by mascguy (Christopher Nielsen), 9 months ago)
  • src/python/grpcio/commands.py

    #========================================================================================
    # From 31fc452b68e429c029f00b5fcc54292a303be0c6 Mon Sep 17 00:00:00 2001
    # From: Georgy Yakovlev <168902+gyakovlev@users.noreply.github.com>
    # Date: Mon, 28 Nov 2022 15:07:36 -0800
    # Subject: [PATCH] respect CC variable (#26480)
    #========================================================================================
    def compiler_ok_with_extra_std(): 
    228228            """
    229229            try:
    230230                # TODO(lidiz) Remove the generated a.out for success tests.
    231                 cc_test = subprocess.Popen(['cc', '-x', 'c', '-std=c++14', '-'],
     231                cc = os.environ.get('CC', 'cc')
     232                cc_test = subprocess.Popen([cc, '-x', 'c', '-std=c++14', '-'],
    232233                                           stdin=subprocess.PIPE,
    233234                                           stdout=subprocess.PIPE,
    234235                                           stderr=subprocess.PIPE)